Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions crates/lib/src/compiler/libquil.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,4 +344,21 @@ MEASURE 1 ro[1]
}
);
}

#[tokio::test]
async fn test_parametric_compilation() {
let client = quilc_client();
let isa = TargetDevice::try_from(aspen_9_isa())
.expect("aspen-9 compiler isa should become TargetDevice");
const PARAMETRIC_PROGRAM: &str = r#"
PRAGMA INITIAL_REWIRING "PARTIAL"
DECLARE ro BIT
DECLARE theta REAL
RX(theta) 0
MEASURE 0 ro
"#;
client
.compile_program(PARAMETRIC_PROGRAM, isa, CompilerOpts::new())
.expect("program should compile");
}
}
17 changes: 17 additions & 0 deletions crates/lib/src/compiler/quilc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,4 +490,21 @@ MEASURE 1 ro[1]
}
);
}

#[tokio::test]
async fn test_parametric_compilation() {
let client = rpcq_client().await;
let isa = TargetDevice::try_from(aspen_9_isa())
.expect("aspen-9 compiler isa should become TargetDevice");
const PARAMETRIC_PROGRAM: &str = r#"
PRAGMA INITIAL_REWIRING "PARTIAL"
DECLARE ro BIT
DECLARE theta REAL
RX(theta) 0
MEASURE 0 ro
"#;
client
.compile_program(PARAMETRIC_PROGRAM, isa, CompilerOpts::new())
.expect("program should compile");
}
}