Skip to content

Commit

Permalink
qiskit.extensions, cx, i
Browse files Browse the repository at this point in the history
  • Loading branch information
purva-thakre committed Feb 26, 2024
1 parent d3d9b1a commit 40c6eba
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
22 changes: 11 additions & 11 deletions mitiq/ddd/tests/test_insertion.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,16 @@
circuit_qiskit_validated.x(i)
circuit_qiskit_validated.x(3)
if i != 3 and i != 0:
circuit_qiskit_validated.i(i)
circuit_qiskit_validated.id(i)
circuit_qiskit_validated.x(i)
circuit_qiskit_validated.i(i)
circuit_qiskit_validated.id(i)
circuit_qiskit_validated.x(i)
circuit_qiskit_validated.i(i)
circuit_qiskit_validated.id(i)
elif i == 0:
circuit_qiskit_validated.i(i)
circuit_qiskit_validated.id(i)
circuit_qiskit_validated.x(i)
circuit_qiskit_validated.x(i)
circuit_qiskit_validated.i(i)
circuit_qiskit_validated.id(i)
circuit_qiskit_validated.cx(0, 3)

# Qiskit validate with measurement
Expand All @@ -86,17 +86,17 @@
circuit_qiskit_two_validated.x(3)
if i != 3 and i != 0:
if i == 1:
circuit_qiskit_two_validated.i(i)
circuit_qiskit_two_validated.i(i)
circuit_qiskit_two_validated.id(i)
circuit_qiskit_two_validated.id(i)
circuit_qiskit_two_validated.x(i)
circuit_qiskit_two_validated.i(i)
circuit_qiskit_two_validated.id(i)
circuit_qiskit_two_validated.x(i)
circuit_qiskit_two_validated.i(i)
circuit_qiskit_two_validated.id(i)
elif i == 0:
circuit_qiskit_two_validated.i(i)
circuit_qiskit_two_validated.id(i)
circuit_qiskit_two_validated.x(i)
circuit_qiskit_two_validated.x(i)
circuit_qiskit_two_validated.i(i)
circuit_qiskit_two_validated.id(i)
circuit_qiskit_two_validated.cx(0, 3)
circuit_qiskit_two_validated.measure(2, 3)

Expand Down
8 changes: 4 additions & 4 deletions mitiq/pec/types/tests/test_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def test_init_with_qiskit_circuit():
qreg = qiskit.QuantumRegister(2)
circ = qiskit.QuantumCircuit(qreg)
_ = circ.h(qreg[0])
_ = circ.cnot(*qreg)
_ = circ.cx(*qreg)

cirq_qreg = cirq.LineQubit.range(2)
cirq_circ = cirq.Circuit(cirq.H.on(cirq_qreg[0]), cirq.CNOT.on(*cirq_qreg))
Expand All @@ -100,8 +100,8 @@ def test_init_with_qiskit_circuit():
(
cirq.H,
cirq.H(cirq.LineQubit(0)),
qiskit.extensions.HGate,
qiskit.extensions.CHGate,
qiskit.circuit.library.HGate,
qiskit.circuit.library.CHGate,
pyquil.gates.H,
),
)
Expand Down Expand Up @@ -142,7 +142,7 @@ def test_unknown_channel_matrix():
qreg = qiskit.QuantumRegister(2)
circ = qiskit.QuantumCircuit(qreg)
_ = circ.h(qreg[0])
_ = circ.cnot(*qreg)
_ = circ.cx(*qreg)

cirq_qreg = cirq.LineQubit.range(2)
cirq_circ = cirq.Circuit(cirq.H.on(cirq_qreg[0]), cirq.CNOT.on(*cirq_qreg))
Expand Down
2 changes: 1 addition & 1 deletion mitiq/tests/test_conversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
qiskit_qreg = qiskit.QuantumRegister(2)
qiskit_circuit = qiskit.QuantumCircuit(qiskit_qreg)
qiskit_circuit.h(qiskit_qreg[0])
qiskit_circuit.cnot(*qiskit_qreg)
qiskit_circuit.cx(*qiskit_qreg)
qasm_str = qiskit_circuit.qasm()


Expand Down

0 comments on commit 40c6eba

Please sign in to comment.