Skip to content

Commit 6873432

Browse files
committed
Replaced the new tests by an actual reproducer
1 parent 56ba425 commit 6873432

1 file changed

Lines changed: 9 additions & 14 deletions

File tree

test/qpy_compat/test_qpy.py

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,15 @@ def generate_replay_with_expression_substitutions():
861861
qc = QuantumCircuit(1)
862862
qc.rz(a2, 0)
863863

864-
return [qc]
864+
qc2 = QuantumCircuit(1)
865+
theta = Parameter("θ")
866+
rz = Parameter("rz")
867+
exp = theta + np.pi
868+
exp = exp.subs({theta: rz})
869+
exp = exp.subs({rz: theta})
870+
qc2.rz(exp, 0)
871+
872+
return [qc, qc2]
865873

866874

867875
def generate_v14_expr():
@@ -918,17 +926,6 @@ def generate_v14_expr():
918926
]
919927

920928

921-
def generate_real_amplitude_circuits():
922-
"""Real-amplitudes 2-local circuit`."""
923-
from qiskit.circuit.library import RealAmplitudes
924-
from qiskit import transpile
925-
926-
circuit = RealAmplitudes(num_qubits=2, reps=2)
927-
isa_circuit = transpile(circuit.decompose(), optimization_level=0)
928-
929-
return [isa_circuit, circuit]
930-
931-
932929
def generate_box():
933930
"""Circuits that contain `Box`. Only added in Qiskit 2.0."""
934931
bare = QuantumCircuit(2, name="box-bare")
@@ -971,8 +968,6 @@ def generate_circuits(version_parts, current_version, load_context=False):
971968
generate_single_clbit_condition_teleportation(current_version)
972969
]
973970

974-
output_circuits["real_amplitude.qpy"] = generate_real_amplitude_circuits()
975-
976971
if version_parts >= (0, 19, 0):
977972
output_circuits["param_phase.qpy"] = generate_param_phase()
978973

0 commit comments

Comments
 (0)