Skip to content

Commit

Permalink
add supported version test for new pragma
Browse files Browse the repository at this point in the history
  • Loading branch information
rreiner-hqs committed Nov 27, 2024
1 parent 7418c4b commit 8538d2a
Showing 1 changed file with 2 additions and 25 deletions.
27 changes: 2 additions & 25 deletions roqoqo/tests/integration/operations/supported_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,30 +392,7 @@ fn test_version_1_16_0_four_qubit_gate(operation: operations::FourQubitGateOpera
assert_eq!(operation.minimum_supported_roqoqo_version(), (1, 16, 0));
}

#[test_case(operations::SingleQubitGateOperation::from(operations::InvTGate::new(0)); "SqrtPaInvTGateuliY")]
#[test_case(operations::SingleQubitGateOperation::from(operations::InvSGate::new(0)); "InvSGate")]
#[test_case(operations::SingleQubitGateOperation::from(operations::SXGate::new(0)); "SXGate")]
#[test_case(operations::SingleQubitGateOperation::from(operations::InvSXGate::new(0)); "InvSXGate")]
fn test_version_1_17_0_single_qubit_gate(operation: operations::SingleQubitGateOperation) {
assert_eq!(operation.minimum_supported_roqoqo_version(), (1, 17, 0));
}

#[test_case(operations::ThreeQubitGateOperation::from(operations::ControlledSWAP::new(0, 1, 2)); "ControlledSWAP")]
#[test_case(operations::ThreeQubitGateOperation::from(operations::PhaseShiftedControlledControlledZ::new(0, 1, 2, CalculatorFloat::PI)); "PhaseShiftedControlledControlledZ")]
#[test_case(operations::ThreeQubitGateOperation::from(operations::PhaseShiftedControlledControlledPhase::new(0, 1, 2, CalculatorFloat::PI, CalculatorFloat::PI)); "PhaseShiftedControlledControlledPhase")]
fn test_version_1_17_0_three_qubit_gate(operation: operations::ThreeQubitGateOperation) {
assert_eq!(operation.minimum_supported_roqoqo_version(), (1, 17, 0));
}

#[test_case(
operations::FourQubitGateOperation::from(operations::TripleControlledPauliX::new(0, 1, 2, 3)); "TripleControlledPauliX"
)]
#[test_case(
operations::FourQubitGateOperation::from(operations::TripleControlledPauliZ::new(0, 1, 2, 3)); "TripleControlledPauliZ"
)]
#[test_case(
operations::FourQubitGateOperation::from(operations::TripleControlledPhaseShift::new(0, 1, 2, 3, CalculatorFloat::PI)); "TripleControlledPhaseShift"
)]
fn test_version_1_17_0_four_qubit_gate(operation: operations::FourQubitGateOperation) {
#[test_case(operations::Operation::from(operations::PragmaSimulationRepetitions::new(100)))]
fn test_version_1_17_0_pragmas(operation: operations::Operation) {
assert_eq!(operation.minimum_supported_roqoqo_version(), (1, 17, 0));
}

0 comments on commit 8538d2a

Please sign in to comment.