Circuit Library
qiskit.circuit.library
The circuit library is a collection of well-studied and valuable circuits, directives, and gates. We call them valuable for different reasons, for instance they can serve as building blocks for algorithms or they are circuits that we think are hard to simulate classically.
Each element can be plugged into a circuit using the QuantumCircuit.append()
method and so the circuit library allows users to program at higher levels of abstraction. For example, to append a multi-controlled CNOT:
from qiskit.circuit.library import MCXGate
gate = MCXGate(4)
from qiskit import QuantumCircuit
circuit = QuantumCircuit(5)
circuit.append(gate, [0, 1, 4, 2, 3])
circuit.draw('mpl')
The library is organized in several sections. The function get_standard_gate_name_mapping()
allows you to see the available standard gates and operations.
get_standard_gate_name_mapping
qiskit.circuit.library.get_standard_gate_name_mapping()
Return a dictionary mapping the name of standard gates and instructions to an object for that name.
Examples
from qiskit.circuit.library import get_standard_gate_name_mapping
gate_name_map = get_standard_gate_name_mapping()
cx_object = gate_name_map["cx"]
print(cx_object)
print(type(cx_object))
Instruction(name='cx', num_qubits=2, num_clbits=0, params=[])
_SingletonCXGate
Standard gates
These operations are reversible unitary gates and they all subclass Gate
. As a consequence, they all have the methods to_matrix()
, power()
, and control()
, which we can generally only apply to unitary operations.
For example:
from qiskit.circuit.library import XGate
gate = XGate()
print(gate.to_matrix()) # X gate
print(gate.power(1/2).to_matrix()) # √X gate
print(gate.control(1).to_matrix()) # CX (controlled X) gate
[[0.+0.j 1.+0.j]
[1.+0.j 0.+0.j]]
[[0.5+0.5j 0.5-0.5j]
[0.5-0.5j 0.5+0.5j]]
[[1.+0.j 0.+0.j 0.+0.j 0.+0.j]
[0.+0.j 0.+0.j 0.+0.j 1.+0.j]
[0.+0.j 0.+0.j 1.+0.j 0.+0.j]
[0.+0.j 1.+0.j 0.+0.j 0.+0.j]]
C3XGate (*args[, _force_mutable]) | The X gate controlled on 3 qubits. |
C3SXGate (*args[, _force_mutable]) | The 3-qubit controlled sqrt-X gate. |
C4XGate (*args[, _force_mutable]) | The 4-qubit controlled X gate. |
CCXGate (*args[, _force_mutable]) | CCX gate, also known as Toffoli gate. |
DCXGate (*args[, _force_mutable]) | Double-CNOT gate. |
CHGate (*args[, _force_mutable]) | Controlled-Hadamard gate. |
CPhaseGate (theta[, label, ctrl_state, ...]) | Controlled-Phase gate. |
CRXGate (theta[, label, ctrl_state, ...]) | Controlled-RX gate. |
CRYGate (theta[, label, ctrl_state, ...]) | Controlled-RY gate. |
CRZGate (theta[, label, ctrl_state, ...]) | Controlled-RZ gate. |
CSGate (*args[, _force_mutable]) | Controlled-S gate. |
CSdgGate (*args[, _force_mutable]) | Controlled-S^dagger gate. |
CSwapGate (*args[, _force_mutable]) | Controlled-SWAP gate, also known as the Fredkin gate. |
CSXGate (*args[, _force_mutable]) | Controlled-√X gate. |
CUGate (theta, phi, lam, gamma[, label, ...]) | Controlled-U gate (4-parameter two-qubit gate). |
CU1Gate (theta[, label, ctrl_state, ...]) | Controlled-U1 gate. |
CU3Gate (theta, phi, lam[, label, ...]) | Controlled-U3 gate (3-parameter two-qubit gate). |
CXGate (*args[, _force_mutable]) | Controlled-X gate. |
CYGate (*args[, _force_mutable]) | Controlled-Y gate. |
CZGate (*args[, _force_mutable]) | Controlled-Z gate. |
CCZGate (*args[, _force_mutable]) | CCZ gate. |
ECRGate (*args[, _force_mutable]) | An echoed cross-resonance gate. |
HGate (*args[, _force_mutable]) | Single-qubit Hadamard gate. |
IGate (*args[, _force_mutable]) | Identity gate. |
MSGate (num_qubits, theta[, label]) | The Mølmer–Sørensen gate. |
PhaseGate (theta[, label, duration, unit]) | Single-qubit rotation about the Z axis. |
RCCXGate (*args[, _force_mutable]) | The simplified Toffoli gate, also referred to as Margolus gate. |
RC3XGate (*args[, _force_mutable]) | The simplified 3-controlled Toffoli gate. |
RGate (theta, phi[, label, duration, unit]) | Rotation θ around the cos(φ)x + sin(φ)y axis. |
RXGate (theta[, label, duration, unit]) | Single-qubit rotation about the X axis. |
RXXGate (theta[, label, duration, unit]) | A parametric 2-qubit interaction (rotation about XX). |
RYGate (theta[, label, duration, unit]) | Single-qubit rotation about the Y axis. |
RYYGate (theta[, label, duration, unit]) | A parametric 2-qubit interaction (rotation about YY). |
RZGate (phi[, label, duration, unit]) | Single-qubit rotation about the Z axis. |
RZZGate (theta[, label, duration, unit]) | A parametric 2-qubit interaction (rotation about ZZ). |
RZXGate (theta[, label, duration, unit]) | A parametric 2-qubit interaction (rotation about ZX). |
XXMinusYYGate (theta[, beta, label, ...]) | XX-YY interaction gate. |
XXPlusYYGate (theta[, beta, label, duration, ...]) | XX+YY interaction gate. |
SGate (*args[, _force_mutable]) | Single qubit S gate (Z**0.5). |
SdgGate (*args[, _force_mutable]) | Single qubit S-adjoint gate (~Z**0.5). |
SwapGate (*args[, _force_mutable]) | The SWAP gate. |
iSwapGate (*args[, _force_mutable]) | iSWAP gate. |
SXGate (*args[, _force_mutable]) | The single-qubit Sqrt(X) gate (). |
SXdgGate (*args[, _force_mutable]) | The inverse single-qubit Sqrt(X) gate. |
TGate (*args[, _force_mutable]) | Single qubit T gate (Z**0.25). |
TdgGate (*args[, _force_mutable]) | Single qubit T-adjoint gate (~Z**0.25). |
UGate (theta, phi, lam[, label, duration, unit]) | Generic single-qubit rotation gate with 3 Euler angles. |
U1Gate (theta[, label, duration, unit]) | Single-qubit rotation about the Z axis. |
U2Gate (phi, lam[, label, duration, unit]) | Single-qubit rotation about the X+Z axis. |
U3Gate (theta, phi, lam[, label, duration, unit]) | Generic single-qubit rotation gate with 3 Euler angles. |
XGate (*args[, _force_mutable]) | The single-qubit Pauli-X gate (). |
YGate (*args[, _force_mutable]) | The single-qubit Pauli-Y gate (). |
ZGate (*args[, _force_mutable]) | The single-qubit Pauli-Z gate (). |
GlobalPhaseGate (phase[, label, duration, unit]) | The global phase gate (). |
Standard Directives
Directives are operations to the quantum stack that are meant to be interpreted by the backend or the transpiler. In general, the transpiler or backend might optionally ignore them if there is no implementation for them.
Standard Operations
Operations are non-reversible changes in the quantum state of the circuit.
Generalized Gates
These “gates” (many are QuantumCircuit
subclasses) allow to set the amount of qubits involved at instantiation time.
from qiskit.circuit.library import DiagonalGate
diagonal = DiagonalGate([1, 1j])
print(diagonal.num_qubits)
diagonal = DiagonalGate([1, 1, 1, -1])
print(diagonal.num_qubits)
1
2
Diagonal (diag) | Circuit implementing a diagonal transformation. |
DiagonalGate (diag) | A generic diagonal quantum gate. |
MCMT (gate, num_ctrl_qubits, num_target_qubits) | The multi-controlled multi-target gate, for an arbitrary singly controlled target gate. |
MCMTVChain (gate, num_ctrl_qubits, ...) | The MCMT implementation using the CCX V-chain. |
Permutation (num_qubits[, pattern, seed]) | An n_qubit circuit that permutes qubits. |
PermutationGate (pattern) | A gate that permutes qubits. |
GMS (num_qubits, theta) | Global Mølmer–Sørensen gate. |
GR (num_qubits, theta, phi) | Global R gate. |
GRX (num_qubits, theta) | Global RX gate. |
GRY (num_qubits, theta) | Global RY gate. |
GRZ (num_qubits, phi) | Global RZ gate. |
MCMTGate (gate, num_ctrl_qubits, ...[, ...]) | The multi-controlled multi-target gate, for an arbitrary singly controlled target gate. |
MCPhaseGate (lam, num_ctrl_qubits[, label, ...]) | Multi-controlled-Phase gate. |
MCXGate ([num_ctrl_qubits, label, ...]) | The general, multi-controlled X gate. |
MCXGrayCode ([num_ctrl_qubits, label, ...]) | Implement the multi-controlled X gate using the Gray code. |
MCXRecursive ([num_ctrl_qubits, label, ...]) | Implement the multi-controlled X gate using recursion. |
MCXVChain ([num_ctrl_qubits, dirty_ancillas, ...]) | Implement the multi-controlled X gate using a V-chain of CX gates. |
RVGate (v_x, v_y, v_z[, basis]) | Rotation around arbitrary rotation axis where is angle of rotation in radians. |
PauliGate (label) | A multi-qubit Pauli gate. |
LinearFunction (linear[, validate_input]) | A linear reversible circuit on n qubits. |
Isometry (isometry, num_ancillas_zero, ...[, ...]) | Decomposition of arbitrary isometries from to qubits. |
UnitaryGate (data[, label, check_input, ...]) | Class quantum gates specified by a unitary matrix. |
UCGate (gate_list[, up_to_diagonal]) | Uniformly controlled gate (also called multiplexed gate). |
UCPauliRotGate (angle_list, rot_axis) | Uniformly controlled Pauli rotations. |
UCRXGate (angle_list) | Uniformly controlled Pauli-X rotations. |
UCRYGate (angle_list) | Uniformly controlled Pauli-Y rotations. |
UCRZGate (angle_list) | Uniformly controlled Pauli-Z rotations. |
Boolean Logic Circuits
These are QuantumCircuit
subclasses that implement boolean logic operations, such as the logical or of a set of qubit states.
AND (num_variable_qubits[, flags, mcx_mode]) | A circuit implementing the logical AND operation on a number of qubits. |
AndGate (num_variable_qubits[, flags]) | A gate representing the logical AND operation on a number of qubits. |
OR (num_variable_qubits[, flags, mcx_mode]) | A circuit implementing the logical OR operation on a number of qubits. |
OrGate (num_variable_qubits[, flags]) | A gate representing the logical OR operation on a number of qubits. |
XOR (num_qubits[, amount, seed]) | An n_qubit circuit for bitwise xor-ing the input with some integer amount . |
BitwiseXorGate (num_qubits, amount) | An n-qubit gate for bitwise xor-ing the input with some integer amount . |
random_bitwise_xor (num_qubits, seed) | Create a random BitwiseXorGate. |
InnerProduct (num_qubits) | A 2n-qubit Boolean function that computes the inner product of two n-qubit vectors over . |
InnerProductGate (num_qubits) | A 2n-qubit Boolean function that computes the inner product of two n-qubit vectors over . |
Basis Change Circuits
These circuits allow basis transformations of the qubit states. For example, in the case of the Quantum Fourier Transform (QFT), it transforms between the computational basis and the Fourier basis.
QFT ([num_qubits, approximation_degree, ...]) | Quantum Fourier Transform Circuit. |
QFTGate (num_qubits) | Quantum Fourier Transform Gate. |
Arithmetic Circuits
These QuantumCircuit
s perform classical arithmetic, such as addition or multiplication.
Amplitude Functions
LinearAmplitudeFunction (num_state_qubits, ...) | A circuit implementing a (piecewise) linear function on qubit amplitudes. |
Functional Pauli Rotations
FunctionalPauliRotations ([num_state_qubits, ...]) | Base class for functional Pauli rotations. |
LinearPauliRotations ([num_state_qubits, ...]) | Linearly-controlled X, Y or Z rotation. |
PolynomialPauliRotations ([num_state_qubits, ...]) | A circuit implementing polynomial Pauli rotations. |
PiecewiseLinearPauliRotations ([...]) | Piecewise-linearly-controlled Pauli rotations. |
PiecewisePolynomialPauliRotations ([...]) | Piecewise-polynomially-controlled Pauli rotations. |
PiecewiseChebyshev (f_x[, degree, ...]) | Piecewise Chebyshev approximation to an input function. |
Adders
DraperQFTAdder (num_state_qubits[, kind, name]) | A circuit that uses QFT to perform in-place addition on two qubit registers. |
CDKMRippleCarryAdder (num_state_qubits[, ...]) | A ripple-carry circuit to perform in-place addition on two qubit registers. |
VBERippleCarryAdder (num_state_qubits[, ...]) | The VBE ripple carry adder [1]. |
WeightedAdder ([num_state_qubits, weights, name]) | A circuit to compute the weighted sum of qubit registers. |
ModularAdderGate (num_state_qubits[, label]) | Compute the sum modulo of two -sized qubit registers. |
HalfAdderGate (num_state_qubits[, label]) | Compute the sum of two equally-sized qubit registers, including a carry-out bit. |
FullAdderGate (num_state_qubits[, label]) | Compute the sum of two -sized qubit registers, including carry-in and -out bits. |
Multipliers
HRSCumulativeMultiplier (num_state_qubits[, ...]) | A multiplication circuit to store product of two input registers out-of-place. |
RGQFTMultiplier (num_state_qubits[, ...]) | A QFT multiplication circuit to store product of two input registers out-of-place. |
MultiplierGate (num_state_qubits[, ...]) | Compute the product of two equally sized qubit registers into a new register. |
Comparators
IntegerComparator ([num_state_qubits, value, ...]) | Integer Comparator. |
Functions on binary variables
QuadraticForm ([num_result_qubits, ...]) | Implements a quadratic form on binary variables encoded in qubit registers. |
Other arithmetic functions
ExactReciprocal (num_state_qubits, scaling[, ...]) | Exact reciprocal |
Particular Quantum Circuits
The following gates and quantum circuits define specific quantum circuits of interest:
FourierChecking (f, g) | Fourier checking circuit. |
GraphState (adjacency_matrix) | Circuit to prepare a graph state. |
GraphStateGate (adjacency_matrix) | A gate representing a graph state. |
HiddenLinearFunction (adjacency_matrix) | Circuit to solve the hidden linear function problem. |
IQP (interactions) | Instantaneous quantum polynomial (IQP) circuit. |
QuantumVolume (num_qubits[, depth, seed, ...]) | A quantum volume model circuit. |
PhaseEstimation (num_evaluation_qubits, unitary) | Phase Estimation circuit. |
GroverOperator (oracle[, state_preparation, ...]) | The Grover operator. |
PhaseOracle (expression[, synthesizer, var_order]) | Phase Oracle. |
PauliEvolutionGate (operator[, time, label, ...]) | Time-evolution of an operator consisting of Paulis. |
HamiltonianGate (data, time[, label]) | Class for representing evolution by a Hamiltonian operator as a gate. |
UnitaryOverlap (unitary1, unitary2[, ...]) | Circuit that returns the overlap between two unitaries . |
For circuits that have a well-defined structure it is preferrable to use the following functions to construct them:
fourier_checking (f, g) | Fourier checking circuit. |
hidden_linear_function (adjacency_matrix) | Circuit to solve the hidden linear function problem. |
iqp (interactions) | Instantaneous quantum polynomial time (IQP) circuit. |
random_iqp (num_qubits[, seed]) | A random instantaneous quantum polynomial time (IQP) circuit. |
quantum_volume (num_qubits[, depth, seed]) | A quantum volume model circuit. |
phase_estimation (num_evaluation_qubits, unitary) | Phase Estimation circuit. |
grover_operator (oracle[, state_preparation, ...]) | Construct the Grover operator. |
unitary_overlap (unitary1, unitary2[, ...]) | Circuit that returns the overlap between two unitaries . |
N-local circuits
The following functions return a parameterized QuantumCircuit
to use as ansatz in a broad set of variational quantum algorithms:
n_local (num_qubits, rotation_blocks, ...[, ...]) | Construct an n-local variational circuit. |
efficient_su2 (num_qubits[, su2_gates, ...]) | The hardware-efficient 2-local circuit. |
real_amplitudes (num_qubits[, entanglement, ...]) | Construct a real-amplitudes 2-local circuit. |
pauli_two_design (num_qubits[, reps, seed, ...]) | Construct a Pauli 2-design ansatz. |
excitation_preserving (num_qubits[, mode, ...]) | The heuristic excitation-preserving wave function ansatz. |
qaoa_ansatz (cost_operator[, reps, ...]) | A generalized QAOA quantum circuit with a support of custom initial states and mixers. |
hamiltonian_variational_ansatz (hamiltonian) | Construct a Hamiltonian variational ansatz. |
evolved_operator_ansatz (operators[, reps, ...]) | Construct an ansatz out of operator evolutions. |
These BlueprintCircuit
subclasses are used as parameterized models (a.k.a. ansatzes or variational forms) in variational algorithms. They are heavily used in near-term algorithms in e.g. Chemistry, Physics or Optimization.
NLocal ([num_qubits, rotation_blocks, ...]) | The n-local circuit class. |
TwoLocal ([num_qubits, rotation_blocks, ...]) | The two-local circuit. |
PauliTwoDesign ([num_qubits, reps, seed, ...]) | The Pauli Two-Design ansatz. |
RealAmplitudes ([num_qubits, entanglement, ...]) | The real-amplitudes 2-local circuit. |
EfficientSU2 ([num_qubits, su2_gates, ...]) | The hardware efficient SU(2) 2-local circuit. |
EvolvedOperatorAnsatz ([operators, reps, ...]) | The evolved operator ansatz. |
ExcitationPreserving ([num_qubits, mode, ...]) | The heuristic excitation-preserving wave function ansatz. |
QAOAAnsatz ([cost_operator, reps, ...]) | A generalized QAOA quantum circuit with a support of custom initial states and mixers. |
Data encoding circuits
The following functions return a parameterized QuantumCircuit
to use as data encoding circuits in a series of variational quantum algorithms:
pauli_feature_map (feature_dimension[, reps, ...]) | The Pauli expansion circuit. |
z_feature_map (feature_dimension[, reps, ...]) | The first order Pauli Z-evolution circuit. |
zz_feature_map (feature_dimension[, reps, ...]) | Second-order Pauli-Z evolution circuit. |
These BlueprintCircuit
encode classical data in quantum states and are used as feature maps for classification.
PauliFeatureMap ([feature_dimension, reps, ...]) | The Pauli Expansion circuit. |
ZFeatureMap (feature_dimension[, reps, ...]) | The first order Pauli Z-evolution circuit. |
ZZFeatureMap (feature_dimension[, reps, ...]) | Second-order Pauli-Z evolution circuit. |
Data preparation circuits
The following operations are used for state preparation:
StatePreparation (params[, num_qubits, ...]) | Complex amplitude state preparation. |
Initialize (params[, num_qubits, normalize]) | Complex amplitude initialization. |
Template circuits
Templates are functions that return circuits that compute the identity. They are used at circuit optimization where matching part of the template allows the compiler to replace the match with the inverse of the remainder from the template.
In this example, the identity constant in a template is checked:
from qiskit.circuit.library.templates import template_nct_4b_1
from qiskit.quantum_info import Operator
import numpy as np
template = template_nct_4b_1()
identity = np.identity(2 ** len(template.qubits), dtype=complex)
data = Operator(template).data
np.allclose(data, identity) # True, template_nct_4b_1 is the identity
NCT (Not-CNOT-Toffoli) template circuits
Template circuits for XGate
, CXGate
, and CCXGate
(Toffoli) gates.
Reference: Maslov, D. and Dueck, G. W. and Miller, D. M., Techniques for the synthesis of reversible Toffoli networks, 2007 http://dx.doi.org/10.1145/1278349.1278355
template_nct_2a_1
qiskit.circuit.library.templates.nct.template_nct_2a_1()
Template 2a_1:
┌───┐┌───┐
q_0: ┤ X ├┤ X ├
└───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_2a_2
qiskit.circuit.library.templates.nct.template_nct_2a_2()
Template 2a_2:
q_0: ──■────■──
┌─┴─┐┌─┴─┐
q_1: ┤ X ├┤ X ├
└───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_2a_3
qiskit.circuit.library.templates.nct.template_nct_2a_3()
Template 2a_3:
q_0: ──■────■──
│ │
q_1: ──■────■──
┌─┴─┐┌─┴─┐
q_2: ┤ X ├┤ X ├
└───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_4a_1
qiskit.circuit.library.templates.nct.template_nct_4a_1()
Template 4a_1:
q_0: ───────■─────────■──
│ │
q_1: ──■────┼────■────┼──
│ │ │ │
q_2: ──■────■────■────■──
│ ┌─┴─┐ │ ┌─┴─┐
q_3: ──┼──┤ X ├──┼──┤ X ├
┌─┴─┐└───┘┌─┴─┐└───┘
q_4: ┤ X ├─────┤ X ├─────
└───┘ └───┘
Returns
template as a quantum circuit.
Return type
template_nct_4a_2
qiskit.circuit.library.templates.nct.template_nct_4a_2()
Template 4a_2:
q_0: ──■─────────■───────
│ │
q_1: ──■────■────■────■──
│ ┌─┴─┐ │ ┌─┴─┐
q_2: ──┼──┤ X ├──┼──┤ X ├
┌─┴─┐└───┘┌─┴─┐└───┘
q_3: ┤ X ├─────┤ X ├─────
└───┘ └───┘
Returns
template as a quantum circuit.
Return type
template_nct_4a_3
qiskit.circuit.library.templates.nct.template_nct_4a_3()
Template 4a_3:
q_0: ──■────■────■────■──
│ ┌─┴─┐ │ ┌─┴─┐
q_1: ──┼──┤ X ├──┼──┤ X ├
┌─┴─┐└───┘┌─┴─┐└───┘
q_2: ┤ X ├─────┤ X ├─────
└───┘ └───┘
Returns
template as a quantum circuit.
Return type
template_nct_4b_1
qiskit.circuit.library.templates.nct.template_nct_4b_1()
Template 4b_1:
q_0: ───────■─────────■──
│ │
q_1: ──■────┼────■────┼──
│ │ │ │
q_2: ──■────■────■────■──
┌─┴─┐┌─┴─┐┌─┴─┐┌─┴─┐
q_3: ┤ X ├┤ X ├┤ X ├┤ X ├
└───┘└───┘└───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_4b_2
qiskit.circuit.library.templates.nct.template_nct_4b_2()
Template 4b_2:
q_0: ──■─────────■───────
│ │
q_1: ──■────■────■────■──
┌─┴─┐┌─┴─┐┌─┴─┐┌─┴─┐
q_2: ┤ X ├┤ X ├┤ X ├┤ X ├
└───┘└───┘└───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_5a_1
qiskit.circuit.library.templates.nct.template_nct_5a_1()
Template 5a_1:
q_0: ──■────■────■────■────■──
│ ┌─┴─┐ │ ┌─┴─┐ │
q_1: ──■──┤ X ├──■──┤ X ├──┼──
┌─┴─┐└───┘┌─┴─┐└───┘┌─┴─┐
q_2: ┤ X ├─────┤ X ├─────┤ X ├
└───┘ └───┘ └───┘
Returns
template as a quantum circuit.
Return type
template_nct_5a_2
qiskit.circuit.library.templates.nct.template_nct_5a_2()
Template 5a_2:
q_0: ──■─────────■─────────■──
│ ┌───┐ │ ┌───┐ │
q_1: ──■──┤ X ├──■──┤ X ├──┼──
┌─┴─┐└───┘┌─┴─┐└───┘┌─┴─┐
q_2: ┤ X ├─────┤ X ├─────┤ X ├
└───┘ └───┘ └───┘
Returns
template as a quantum circuit.
Return type
template_nct_5a_3
qiskit.circuit.library.templates.nct.template_nct_5a_3()
Template 5a_3:
q_0: ───────■─────────■────■──
┌─┴─┐ ┌─┴─┐ │
q_1: ──■──┤ X ├──■──┤ X ├──┼──
┌─┴─┐└───┘┌─┴─┐└───┘┌─┴─┐
q_2: ┤ X ├─────┤ X ├─────┤ X ├
└───┘ └───┘ └───┘
Returns
template as a quantum circuit.
Return type
template_nct_5a_4
qiskit.circuit.library.templates.nct.template_nct_5a_4()
Template 5a_4:
┌───┐ ┌───┐
q_0: ──■──┤ X ├──■──┤ X ├
┌─┴─┐└───┘┌─┴─┐├───┤
q_1: ┤ X ├─────┤ X ├┤ X ├
└───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_6a_1
qiskit.circuit.library.templates.nct.template_nct_6a_1()
Template 6a_1:
┌───┐ ┌───┐ ┌───┐
q_0: ──■──┤ X ├──■──┤ X ├──■──┤ X ├
┌─┴─┐└─┬─┘┌─┴─┐└─┬─┘┌─┴─┐└─┬─┘
q_1: ┤ X ├──■──┤ X ├──■──┤ X ├──■──
└───┘ └───┘ └───┘
Returns
template as a quantum circuit.
Return type
template_nct_6a_2
qiskit.circuit.library.templates.nct.template_nct_6a_2()
Template 6a_2:
q_0: ──■────■────■────■────■────■──
│ ┌─┴─┐ │ ┌─┴─┐ │ ┌─┴─┐
q_1: ──■──┤ X ├──■──┤ X ├──■──┤ X ├
┌─┴─┐└─┬─┘┌─┴─┐└─┬─┘┌─┴─┐└─┬─┘
q_2: ┤ X ├──■──┤ X ├──■──┤ X ├──■──
└───┘ └───┘ └───┘
Returns
template as a quantum circuit.
Return type
template_nct_6a_3
qiskit.circuit.library.templates.nct.template_nct_6a_3()
Template 6a_3:
q_0: ───────■─────────■────■────■──
┌─┴─┐ ┌─┴─┐ │ ┌─┴─┐
q_1: ──■──┤ X ├──■──┤ X ├──■──┤ X ├
┌─┴─┐└─┬─┘┌─┴─┐└─┬─┘┌─┴─┐└─┬─┘
q_2: ┤ X ├──■──┤ X ├──■──┤ X ├──■──
└───┘ └───┘ └───┘
Returns
template as a quantum circuit.
Return type
template_nct_6a_4
qiskit.circuit.library.templates.nct.template_nct_6a_4()
Template 6a_4:
q_0: ───────■──────────────■───────
┌─┴─┐ ┌───┐ │ ┌───┐
q_1: ──■──┤ X ├──■──┤ X ├──■──┤ X ├
┌─┴─┐└─┬─┘┌─┴─┐└─┬─┘┌─┴─┐└─┬─┘
q_2: ┤ X ├──■──┤ X ├──■──┤ X ├──■──
└───┘ └───┘ └───┘
Returns
template as a quantum circuit.
Return type
template_nct_6b_1
qiskit.circuit.library.templates.nct.template_nct_6b_1()
Template 6b_1:
q_0: ──■─────────■────■─────────■──
│ ┌─┴─┐ │ ┌─┴─┐
q_1: ──■────■──┤ X ├──■────■──┤ X ├
┌─┴─┐┌─┴─┐└─┬─┘┌─┴─┐┌─┴─┐└─┬─┘
q_2: ┤ X ├┤ X ├──■──┤ X ├┤ X ├──■──
└───┘└───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_6b_2
qiskit.circuit.library.templates.nct.template_nct_6b_2()
Template 6b_2:
q_0: ───────■────■─────────■────■──
│ ┌─┴─┐ │ ┌─┴─┐
q_1: ──■────■──┤ X ├──■────■──┤ X ├
┌─┴─┐┌─┴─┐└─┬─┘┌─┴─┐┌─┴─┐└─┬─┘
q_2: ┤ X ├┤ X ├──■──┤ X ├┤ X ├──■──
└───┘└───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_6c_1
qiskit.circuit.library.templates.nct.template_nct_6c_1()
Template 6c_1:
q_0: ──■─────────■─────────■────■──
│ ┌───┐ │ ┌───┐ │ ┌─┴─┐
q_1: ──■──┤ X ├──■──┤ X ├──■──┤ X ├
┌─┴─┐└─┬─┘┌─┴─┐└─┬─┘┌─┴─┐└─┬─┘
q_2: ┤ X ├──■──┤ X ├──■──┤ X ├──■──
└───┘ └───┘ └───┘
Returns
template as a quantum circuit.
Return type
template_nct_7a_1
qiskit.circuit.library.templates.nct.template_nct_7a_1()
Template 7a_1:
┌───┐ ┌───┐
q_0: ┤ X ├──■─────────■────■──┤ X ├──■──
└─┬─┘┌─┴─┐ │ ┌─┴─┐└─┬─┘ │
q_1: ──■──┤ X ├──■────■──┤ X ├──■────■──
└───┘┌─┴─┐┌─┴─┐└───┘ ┌─┴─┐
q_2: ──────────┤ X ├┤ X ├──────────┤ X ├
└───┘└───┘ └───┘
Returns
template as a quantum circuit.
Return type
template_nct_7b_1
qiskit.circuit.library.templates.nct.template_nct_7b_1()
Template 7b_1:
┌───┐ ┌───┐
q_0: ┤ X ├──■─────────■────■──┤ X ├──■──
└───┘┌─┴─┐ │ ┌─┴─┐└───┘ │
q_1: ─────┤ X ├──■────■──┤ X ├───────■──
└───┘┌─┴─┐┌─┴─┐└───┘ ┌─┴─┐
q_2: ──────────┤ X ├┤ X ├──────────┤ X ├
└───┘└───┘ └───┘
Returns
template as a quantum circuit.
Return type
template_nct_7c_1
qiskit.circuit.library.templates.nct.template_nct_7c_1()
Template 7c_1:
┌───┐ ┌───┐
q_0: ┤ X ├──■─────────■────■──┤ X ├──■──
└───┘┌─┴─┐ │ ┌─┴─┐└───┘ │
q_1: ─────┤ X ├──■────■──┤ X ├───────■──
└─┬─┘┌─┴─┐┌─┴─┐└─┬─┘ ┌─┴─┐
q_2: ───────■──┤ X ├┤ X ├──■───────┤ X ├
└───┘└───┘ └───┘
Returns
template as a quantum circuit.
Return type
template_nct_7d_1
qiskit.circuit.library.templates.nct.template_nct_7d_1()
Template 7d_1:
┌───┐ ┌───┐
q_0: ┤ X ├──■─────────■────■──┤ X ├──■──
└─┬─┘┌─┴─┐ │ ┌─┴─┐└─┬─┘ │
q_1: ──■──┤ X ├──■────■──┤ X ├──■────■──
└─┬─┘┌─┴─┐┌─┴─┐└─┬─┘ ┌─┴─┐
q_2: ───────■──┤ X ├┤ X ├──■───────┤ X ├
└───┘└───┘ └───┘
Returns
template as a quantum circuit.
Return type
template_nct_7e_1
qiskit.circuit.library.templates.nct.template_nct_7e_1()
Template 7e_1:
┌───┐ ┌───┐
q_0: ┤ X ├──■─────────■────■──┤ X ├──■──
└───┘┌─┴─┐ │ ┌─┴─┐└───┘ │
q_1: ─────┤ X ├───────┼──┤ X ├───────┼──
└─┬─┘┌───┐┌─┴─┐└─┬─┘ ┌─┴─┐
q_2: ───────■──┤ X ├┤ X ├──■───────┤ X ├
└───┘└───┘ └───┘
Returns
template as a quantum circuit.
Return type
template_nct_9a_1
qiskit.circuit.library.templates.nct.template_nct_9a_1()
Template 9a_1:
┌───┐ ┌───┐ ┌───┐
q_0: ┤ X ├──■──┤ X ├──■────■──┤ X ├──■──
└─┬─┘┌─┴─┐└─┬─┘┌─┴─┐┌─┴─┐└─┬─┘┌─┴─┐
q_1: ──■──┤ X ├──■──┤ X ├┤ X ├──■──┤ X ├
└─┬─┘ │ ├───┤└─┬─┘┌───┐└─┬─┘
q_2: ───────■────■──┤ X ├──■──┤ X ├──■──
└───┘ └───┘
Returns
template as a quantum circuit.
Return type
template_nct_9c_1
qiskit.circuit.library.templates.nct.template_nct_9c_1()
Template 9c_1:
┌───┐ ┌───┐┌───┐ ┌───┐ ┌───┐
q_0: ┤ X ├──■──┤ X ├┤ X ├─────┤ X ├──■───────┤ X ├
└─┬─┘┌─┴─┐└───┘└─┬─┘┌───┐└─┬─┘┌─┴─┐┌───┐└─┬─┘
q_1: ──■──┤ X ├───────■──┤ X ├──■──┤ X ├┤ X ├──■──
└───┘ └───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_9c_2
qiskit.circuit.library.templates.nct.template_nct_9c_2()
Template 9c_2:
q_0: ───────■────■──────────────■────■─────────■──
┌───┐ │ ┌─┴─┐┌───┐ ┌─┴─┐ │ ┌─┴─┐
q_1: ┤ X ├──■──┤ X ├┤ X ├─────┤ X ├──■───────┤ X ├
└─┬─┘┌─┴─┐└───┘└─┬─┘┌───┐└─┬─┘┌─┴─┐┌───┐└─┬─┘
q_2: ──■──┤ X ├───────■──┤ X ├──■──┤ X ├┤ X ├──■──
└───┘ └───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_9c_3
qiskit.circuit.library.templates.nct.template_nct_9c_3()
Template 9c_3:
q_0: ───────■────────────────────────■────────────
┌───┐ │ ┌───┐┌───┐ ┌───┐ │ ┌───┐
q_1: ┤ X ├──■──┤ X ├┤ X ├─────┤ X ├──■───────┤ X ├
└─┬─┘┌─┴─┐└───┘└─┬─┘┌───┐└─┬─┘┌─┴─┐┌───┐└─┬─┘
q_2: ──■──┤ X ├───────■──┤ X ├──■──┤ X ├┤ X ├──■──
└───┘ └───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_9c_4
qiskit.circuit.library.templates.nct.template_nct_9c_4()
Template 9c_4:
q_0: ──■────■─────────■──────────────■────────────
┌─┴─┐ │ ┌───┐┌─┴─┐ ┌───┐ │ ┌───┐
q_1: ┤ X ├──■──┤ X ├┤ X ├─────┤ X ├──■───────┤ X ├
└─┬─┘┌─┴─┐└───┘└─┬─┘┌───┐└─┬─┘┌─┴─┐┌───┐└─┬─┘
q_2: ──■──┤ X ├───────■──┤ X ├──■──┤ X ├┤ X ├──■──
└───┘ └───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_9c_5
qiskit.circuit.library.templates.nct.template_nct_9c_5()
Template 9c_5:
q_0: ────────────■─────────■──────────────■───────
┌───┐ ┌─┴─┐┌───┐ │ ┌───┐ │ ┌───┐
q_1: ┤ X ├──■──┤ X ├┤ X ├──┼──┤ X ├──■────┼──┤ X ├
└─┬─┘┌─┴─┐└───┘└─┬─┘┌─┴─┐└─┬─┘┌─┴─┐┌─┴─┐└─┬─┘
q_2: ──■──┤ X ├───────■──┤ X ├──■──┤ X ├┤ X ├──■──
└───┘ └───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_9c_6
qiskit.circuit.library.templates.nct.template_nct_9c_6()
Template 9c_6:
q_0: ───────■────■─────────■─────────■────■───────
┌───┐ │ ┌─┴─┐┌───┐ │ ┌───┐ │ │ ┌───┐
q_1: ┤ X ├──■──┤ X ├┤ X ├──┼──┤ X ├──■────┼──┤ X ├
└─┬─┘┌─┴─┐└───┘└─┬─┘┌─┴─┐└─┬─┘┌─┴─┐┌─┴─┐└─┬─┘
q_2: ──■──┤ X ├───────■──┤ X ├──■──┤ X ├┤ X ├──■──
└───┘ └───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_9c_7
qiskit.circuit.library.templates.nct.template_nct_9c_7()
Template 9c_7:
q_0: ──■────■────■────■────■─────────■────■───────
┌─┴─┐ │ ┌─┴─┐┌─┴─┐ │ ┌───┐ │ │ ┌───┐
q_1: ┤ X ├──■──┤ X ├┤ X ├──┼──┤ X ├──■────┼──┤ X ├
└─┬─┘┌─┴─┐└───┘└─┬─┘┌─┴─┐└─┬─┘┌─┴─┐┌─┴─┐└─┬─┘
q_2: ──■──┤ X ├───────■──┤ X ├──■──┤ X ├┤ X ├──■──
└───┘ └───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_9c_8
qiskit.circuit.library.templates.nct.template_nct_9c_8()
Template 9c_8:
q_0: ──■─────────■────■─────────■──────────────■──
┌─┴─┐ ┌─┴─┐┌─┴─┐ ┌─┴─┐ ┌─┴─┐
q_1: ┤ X ├──■──┤ X ├┤ X ├─────┤ X ├──■───────┤ X ├
└─┬─┘┌─┴─┐└───┘└─┬─┘┌───┐└─┬─┘┌─┴─┐┌───┐└─┬─┘
q_2: ──■──┤ X ├───────■──┤ X ├──■──┤ X ├┤ X ├──■──
└───┘ └───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_9c_9
qiskit.circuit.library.templates.nct.template_nct_9c_9()
Template 9c_9:
q_0: ──■────■────■────■─────────■────■─────────■──
┌─┴─┐ │ ┌─┴─┐┌─┴─┐ ┌─┴─┐ │ ┌─┴─┐
q_1: ┤ X ├──■──┤ X ├┤ X ├─────┤ X ├──■───────┤ X ├
└─┬─┘┌─┴─┐└───┘└─┬─┘┌───┐└─┬─┘┌─┴─┐┌───┐└─┬─┘
q_2: ──■──┤ X ├───────■──┤ X ├──■──┤ X ├┤ X ├──■──
└───┘ └───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_9c_10
qiskit.circuit.library.templates.nct.template_nct_9c_10()
Template 9c_10:
q_0: ──■─────────■────■────■────■─────────■────■──
┌─┴─┐ ┌─┴─┐┌─┴─┐ │ ┌─┴─┐ │ ┌─┴─┐
q_1: ┤ X ├──■──┤ X ├┤ X ├──┼──┤ X ├──■────┼──┤ X ├
└─┬─┘┌─┴─┐└───┘└─┬─┘┌─┴─┐└─┬─┘┌─┴─┐┌─┴─┐└─┬─┘
q_2: ──■──┤ X ├───────■──┤ X ├──■──┤ X ├┤ X ├──■──
└───┘ └───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_9c_11
qiskit.circuit.library.templates.nct.template_nct_9c_11()
Template 9c_11:
q_0: ───────■────■─────────■────■────■────■────■──
┌───┐ │ ┌─┴─┐┌───┐ │ ┌─┴─┐ │ │ ┌─┴─┐
q_1: ┤ X ├──■──┤ X ├┤ X ├──┼──┤ X ├──■────┼──┤ X ├
└─┬─┘┌─┴─┐└───┘└─┬─┘┌─┴─┐└─┬─┘┌─┴─┐┌─┴─┐└─┬─┘
q_2: ──■──┤ X ├───────■──┤ X ├──■──┤ X ├┤ X ├──■──
└───┘ └───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_9c_12
qiskit.circuit.library.templates.nct.template_nct_9c_12()
Template 9c_12:
q_0: ──■────■────■────■────■────■────■────■────■──
┌─┴─┐ │ ┌─┴─┐┌─┴─┐ │ ┌─┴─┐ │ │ ┌─┴─┐
q_1: ┤ X ├──■──┤ X ├┤ X ├──┼──┤ X ├──■────┼──┤ X ├
└─┬─┘┌─┴─┐└───┘└─┬─┘┌─┴─┐└─┬─┘┌─┴─┐┌─┴─┐└─┬─┘
q_2: ──■──┤ X ├───────■──┤ X ├──■──┤ X ├┤ X ├──■──
└───┘ └───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_9d_1
qiskit.circuit.library.templates.nct.template_nct_9d_1()
Template 9d_1:
┌───┐ ┌───┐ ┌───┐
q_0: ──■───────┤ X ├───────■──┤ X ├───────■──┤ X ├
┌─┴─┐┌───┐└─┬─┘┌───┐┌─┴─┐└─┬─┘┌───┐┌─┴─┐└─┬─┘
q_1: ┤ X ├┤ X ├──■──┤ X ├┤ X ├──■──┤ X ├┤ X ├──■──
└───┘└───┘ └───┘└───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_9d_2
qiskit.circuit.library.templates.nct.template_nct_9d_2()
Template 9d_2:
q_0: ──■────■────■──────────────■──────────────■──
│ │ ┌─┴─┐ ┌─┴─┐ ┌─┴─┐
q_1: ──■────┼──┤ X ├───────■──┤ X ├───────■──┤ X ├
┌─┴─┐┌─┴─┐└─┬─┘┌───┐┌─┴─┐└─┬─┘┌───┐┌─┴─┐└─┬─┘
q_2: ┤ X ├┤ X ├──■──┤ X ├┤ X ├──■──┤ X ├┤ X ├──■──
└───┘└───┘ └───┘└───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_9d_3
qiskit.circuit.library.templates.nct.template_nct_9d_3()
Template 9d_3:
q_0: ──■────■───────────────────■─────────────────
│ │ ┌───┐ ┌─┴─┐ ┌───┐
q_1: ──■────┼──┤ X ├───────■──┤ X ├───────■──┤ X ├
┌─┴─┐┌─┴─┐└─┬─┘┌───┐┌─┴─┐└─┬─┘┌───┐┌─┴─┐└─┬─┘
q_2: ┤ X ├┤ X ├──■──┤ X ├┤ X ├──■──┤ X ├┤ X ├──■──
└───┘└───┘ └───┘└───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_9d_4
qiskit.circuit.library.templates.nct.template_nct_9d_4()
Template 9d_4:
q_0: ───────■─────────■──────────────■────────────
│ ┌───┐ │ ┌───┐ │ ┌───┐
q_1: ──■────┼──┤ X ├──┼────■──┤ X ├──┼────■──┤ X ├
┌─┴─┐┌─┴─┐└─┬─┘┌─┴─┐┌─┴─┐└─┬─┘┌─┴─┐┌─┴─┐└─┬─┘
q_2: ┤ X ├┤ X ├──■──┤ X ├┤ X ├──■──┤ X ├┤ X ├──■──
└───┘└───┘ └───┘└───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_9d_5
qiskit.circuit.library.templates.nct.template_nct_9d_5()
Template 9d_5:
q_0: ──■────■─────────■─────────■────■────────────
│ │ ┌───┐ │ ┌─┴─┐ │ ┌───┐
q_1: ──■────┼──┤ X ├──┼────■──┤ X ├──┼────■──┤ X ├
┌─┴─┐┌─┴─┐└─┬─┘┌─┴─┐┌─┴─┐└─┬─┘┌─┴─┐┌─┴─┐└─┬─┘
q_2: ┤ X ├┤ X ├──■──┤ X ├┤ X ├──■──┤ X ├┤ X ├──■──
└───┘└───┘ └───┘└───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_9d_6
qiskit.circuit.library.templates.nct.template_nct_9d_6()
Template 9d_6:
q_0: ──■────■──────────────■────■─────────■───────
│ │ ┌───┐ │ ┌─┴─┐ │ ┌───┐
q_1: ──■────┼──┤ X ├───────■──┤ X ├───────■──┤ X ├
┌─┴─┐┌─┴─┐└─┬─┘┌───┐┌─┴─┐└─┬─┘┌───┐┌─┴─┐└─┬─┘
q_2: ┤ X ├┤ X ├──■──┤ X ├┤ X ├──■──┤ X ├┤ X ├──■──
└───┘└───┘ └───┘└───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_9d_7
qiskit.circuit.library.templates.nct.template_nct_9d_7()
Template 9d_7:
q_0: ──■────■─────────■────■────■────■────■───────
│ │ ┌───┐ │ │ ┌─┴─┐ │ │ ┌───┐
q_1: ──■────┼──┤ X ├──┼────■──┤ X ├──┼────■──┤ X ├
┌─┴─┐┌─┴─┐└─┬─┘┌─┴─┐┌─┴─┐└─┬─┘┌─┴─┐┌─┴─┐└─┬─┘
q_2: ┤ X ├┤ X ├──■──┤ X ├┤ X ├──■──┤ X ├┤ X ├──■──
└───┘└───┘ └───┘└───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_9d_8
qiskit.circuit.library.templates.nct.template_nct_9d_8()
Template 9d_8:
q_0: ──■────■────■────■─────────■────■─────────■──
│ │ ┌─┴─┐ │ ┌─┴─┐ │ ┌─┴─┐
q_1: ──■────┼──┤ X ├──┼────■──┤ X ├──┼────■──┤ X ├
┌─┴─┐┌─┴─┐└─┬─┘┌─┴─┐┌─┴─┐└─┬─┘┌─┴─┐┌─┴─┐└─┬─┘
q_2: ┤ X ├┤ X ├──■──┤ X ├┤ X ├──■──┤ X ├┤ X ├──■──
└───┘└───┘ └───┘└───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_9d_9
qiskit.circuit.library.templates.nct.template_nct_9d_9()
Template 9d_9:
q_0: ──■────■────■─────────■────■─────────■────■──
│ │ ┌─┴─┐ │ ┌─┴─┐ │ ┌─┴─┐
q_1: ──■────┼──┤ X ├───────■──┤ X ├───────■──┤ X ├
┌─┴─┐┌─┴─┐└─┬─┘┌───┐┌─┴─┐└─┬─┘┌───┐┌─┴─┐└─┬─┘
q_2: ┤ X ├┤ X ├──■──┤ X ├┤ X ├──■──┤ X ├┤ X ├──■──
└───┘└───┘ └───┘└───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
template_nct_9d_10
qiskit.circuit.library.templates.nct.template_nct_9d_10()
Template 9d_10:
q_0: ──■────■────■────■────■────■────■────■────■──
│ │ ┌─┴─┐ │ │ ┌─┴─┐ │ │ ┌─┴─┐
q_1: ──■────┼──┤ X ├──┼────■──┤ X ├──┼────■──┤ X ├
┌─┴─┐┌─┴─┐└─┬─┘┌─┴─┐┌─┴─┐└─┬─┘┌─┴─┐┌─┴─┐└─┬─┘
q_2: ┤ X ├┤ X ├──■──┤ X ├┤ X ├──■──┤ X ├┤ X ├──■──
└───┘└───┘ └───┘└───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
Clifford template circuits
Template circuits over Clifford gates.
clifford_2_1
qiskit.circuit.library.clifford_2_1()
Clifford template 2_1:
q_0: ─■──■─
│ │
q_1: ─■──■─
Returns
template as a quantum circuit.
Return type
clifford_2_2
qiskit.circuit.library.clifford_2_2()
Clifford template 2_2:
q_0: ──■────■──
┌─┴─┐┌─┴─┐
q_1: ┤ X ├┤ X ├
└───┘└───┘
Returns
template as a quantum circuit.
Return type
clifford_2_3
qiskit.circuit.library.clifford_2_3()
Clifford template 2_3:
┌───┐┌───┐
q_0: ┤ H ├┤ H ├
└───┘└───┘
Returns
template as a quantum circuit.
Return type
clifford_2_4
qiskit.circuit.library.clifford_2_4()
Clifford template 2_4:
q_0: ─X──X─
│ │
q_1: ─X──X─
Returns
template as a quantum circuit.
Return type
clifford_3_1
qiskit.circuit.library.clifford_3_1()
Clifford template 3_1:
┌───┐┌───┐┌───┐
q_0: ┤ S ├┤ S ├┤ Z ├
└───┘└───┘└───┘
Returns
template as a quantum circuit.
Return type
clifford_4_1
qiskit.circuit.library.clifford_4_1()
Clifford template 4_1:
┌───┐
q_0: ──■──┤ X ├──■───X─
┌─┴─┐└─┬─┘┌─┴─┐ │
q_1: ┤ X ├──■──┤ X ├─X─
└───┘ └───┘
Returns
template as a quantum circuit.
Return type
clifford_4_2
qiskit.circuit.library.clifford_4_2()
Clifford template 4_2:
q_0: ───────■────────■─
┌───┐┌─┴─┐┌───┐ │
q_1: ┤ H ├┤ X ├┤ H ├─■─
└───┘└───┘└───┘
Returns
template as a quantum circuit.
Return type
clifford_4_3
qiskit.circuit.library.clifford_4_3()
Clifford template 4_3:
┌───┐ ┌─────┐
q_0: ┤ S ├──■──┤ SDG ├──■──
└───┘┌─┴─┐└─────┘┌─┴─┐
q_1: ─────┤ X ├───────┤ X ├
└───┘ └───┘
Returns
template as a quantum circuit.
Return type
clifford_4_4
qiskit.circuit.library.clifford_4_4()
Clifford template 4_4:
┌───┐ ┌─────┐
q_0: ┤ S ├─■─┤ SDG ├─■─
└───┘ │ └─────┘ │
q_1: ──────■─────────■─
Returns
template as a quantum circuit.
Return type
clifford_5_1
qiskit.circuit.library.clifford_5_1()
Clifford template 5_1:
q_0: ──■─────────■─────────■── ┌─┴─┐ ┌─┴─┐ │ q_1: ┤ X ├──■──┤ X ├──■────┼── └───┘┌─┴─┐└───┘┌─┴─┐┌─┴─┐ q_2: ─────┤ X ├─────┤ X ├┤ X ├ └───┘ └───┘└───┘
Returns
template as a quantum circuit.
Return type
clifford_6_1
qiskit.circuit.library.clifford_6_1()
Clifford template 6_1:
┌───┐ ┌───┐┌───┐ q_0: ┤ H ├──■──┤ H ├┤ X ├ ├───┤┌─┴─┐├───┤└─┬─┘ q_1: ┤ H ├┤ X ├┤ H ├──■── └───┘└───┘└───┘
Returns
template as a quantum circuit.
Return type
clifford_6_2
qiskit.circuit.library.clifford_6_2()
Clifford template 6_2:
┌───┐ q_0: ┤ S ├──■───────────■───■─ ├───┤┌─┴─┐┌─────┐┌─┴─┐ │ q_1: ┤ S ├┤ X ├┤ SDG ├┤ X ├─■─ └───┘└───┘└─────┘└───┘
Returns
template as a quantum circuit.
Return type
clifford_6_3
qiskit.circuit.library.clifford_6_3()
Clifford template 6_3:
┌───┐ ┌───┐
q_0: ─X──■─┤ H ├──■──┤ X ├─────
│ │ └───┘┌─┴─┐└─┬─┘┌───┐
q_1: ─X──■──────┤ X ├──■──┤ H ├
└───┘ └───┘
Returns
template as a quantum circuit.
Return type
clifford_6_4
qiskit.circuit.library.clifford_6_4()
Clifford template 6_4:
┌───┐┌───┐┌───┐┌───┐┌───┐┌───┐
q_0: ┤ S ├┤ H ├┤ S ├┤ H ├┤ S ├┤ H ├
└───┘└───┘└───┘└───┘└───┘└───┘
Returns
template as a quantum circuit.
Return type
clifford_6_5
qiskit.circuit.library.clifford_6_5()
Clifford template 6_5:
┌───┐
q_0: ─■───■───┤ S ├───■───────
│ ┌─┴─┐┌┴───┴┐┌─┴─┐┌───┐
q_1: ─■─┤ X ├┤ SDG ├┤ X ├┤ S ├
└───┘└─────┘└───┘└───┘
Returns
template as a quantum circuit.
Return type
clifford_8_1
qiskit.circuit.library.clifford_8_1()
Clifford template 8_1:
┌───┐ ┌───┐ ┌───┐┌─────┐
q_0: ──■───────┤ X ├─┤ S ├─┤ X ├┤ SDG ├
┌─┴─┐┌───┐└─┬─┘┌┴───┴┐└─┬─┘└┬───┬┘
q_1: ┤ X ├┤ H ├──■──┤ SDG ├──■───┤ H ├─
└───┘└───┘ └─────┘ └───┘
Returns
template as a quantum circuit.
Return type
clifford_8_2
qiskit.circuit.library.clifford_8_2()
Clifford template 8_2:
┌───┐
q_0: ──■─────────■───┤ S ├───■────────────
┌─┴─┐┌───┐┌─┴─┐┌┴───┴┐┌─┴─┐┌───┐┌───┐
q_1: ┤ X ├┤ H ├┤ X ├┤ SDG ├┤ X ├┤ S ├┤ H ├
└───┘└───┘└───┘└─────┘└───┘└───┘└───┘
Returns
template as a quantum circuit.
Return type
clifford_8_3
qiskit.circuit.library.clifford_8_3()
Clifford template 8_3:
q_0: ─────────────────■───────────────────────■──
┌───┐┌───┐┌───┐┌─┴─┐┌─────┐┌───┐┌─────┐┌─┴─┐
q_1: ┤ S ├┤ H ├┤ S ├┤ X ├┤ SDG ├┤ H ├┤ SDG ├┤ X ├
└───┘└───┘└───┘└───┘└─────┘└───┘└─────┘└───┘
Returns
template as a quantum circuit.
Return type
RZXGate template circuits
Template circuits with RZXGate
.
rzx_yz
qiskit.circuit.library.rzx_yz(theta=None)
RZX-based template for CX - RYGate - CX.
┌────────┐ ┌─────────┐┌─────────┐┌──────────┐
q_0: ──■──┤ RY(-ϴ) ├──■──┤ RX(π/2) ├┤0 ├┤ RX(-π/2) ├
┌─┴─┐└────────┘┌─┴─┐└─────────┘│ RZX(ϴ) │└──────────┘
q_1: ┤ X ├──────────┤ X ├───────────┤1 ├────────────
└───┘ └───┘ └─────────┘
Parameters
theta (ParameterValueType | None) –
rzx_xz
qiskit.circuit.library.rzx_xz(theta=None)
RZX-based template for CX - RXGate - CX.
┌───┐ ┌───┐┌─────────┐┌─────────┐┌─────────┐┌──────────┐»
q_0: ┤ X ├─────────┤ X ├┤ RZ(π/2) ├┤ RX(π/2) ├┤ RZ(π/2) ├┤0 ├»
└─┬─┘┌───────┐└─┬─┘└─────────┘└─────────┘└─────────┘│ RZX(-ϴ) │»
q_1: ──■──┤ RX(ϴ) ├──■───────────────────────────────────┤1 ├»
└───────┘ └──────────┘»
« ┌─────────┐┌─────────┐┌─────────┐
«q_0: ┤ RZ(π/2) ├┤ RX(π/2) ├┤ RZ(π/2) ├
« └─────────┘└─────────┘└─────────┘
«q_1: ─────────────────────────────────
«
Parameters
theta (ParameterValueType | None) –
rzx_cy
qiskit.circuit.library.rzx_cy(theta=None)
RZX-based template for CX - RYGate - CX.
┌──────────┐
q_0: ──■─────────────■─────────────────────────────────┤0 ├───────────
┌─┴─┐┌───────┐┌─┴─┐┌────────┐┌──────────┐┌───────┐│ RZX(-ϴ) │┌─────────┐
q_1: ┤ X ├┤ RY(ϴ) ├┤ X ├┤ RY(-ϴ) ├┤ RZ(-π/2) ├┤ RX(ϴ) ├┤1 ├┤ RZ(π/2) ├
└───┘└───────┘└───┘└────────┘└──────────┘└───────┘└──────────┘└─────────┘
Parameters
theta (ParameterValueType | None) –
rzx_zz1
qiskit.circuit.library.rzx_zz1(theta=None)
RZX-based template for CX - RZGate - CX.
»
q_0: ──■────────────────────────────────────────────■───────────────────────»
┌─┴─┐┌───────┐┌────┐┌───────┐┌────┐┌────────┐┌─┴─┐┌────────┐┌─────────┐»
q_1: ┤ X ├┤ RZ(ϴ) ├┤ √X ├┤ RZ(π) ├┤ √X ├┤ RZ(3π) ├┤ X ├┤ RZ(-ϴ) ├┤ RZ(π/2) ├»
└───┘└───────┘└────┘└───────┘└────┘└────────┘└───┘└────────┘└─────────┘»
« ┌──────────┐ »
«q_0: ───────────────────────────────┤0 ├──────────────────────»
« ┌─────────┐┌─────────┐┌───────┐│ RZX(-ϴ) │┌─────────┐┌─────────┐»
«q_1: ┤ RX(π/2) ├┤ RZ(π/2) ├┤ RX(ϴ) ├┤1 ├┤ RZ(π/2) ├┤ RX(π/2) ├»
« └─────────┘└─────────┘└───────┘└──────────┘└─────────┘└─────────┘»
«
«q_0: ───────────
« ┌─────────┐
«q_1: ┤ RZ(π/2) ├
« └─────────┘
Parameters
theta (ParameterValueType | None) –
rzx_zz2
qiskit.circuit.library.rzx_zz2(theta=None)
RZX-based template for CX - PhaseGate - CX.
»
q_0: ──■────────────■─────────────────────────────────────────────────────»
┌─┴─┐┌──────┐┌─┴─┐┌───────┐┌─────────┐┌─────────┐┌─────────┐┌───────┐»
q_1: ┤ X ├┤ P(ϴ) ├┤ X ├┤ P(-ϴ) ├┤ RZ(π/2) ├┤ RX(π/2) ├┤ RZ(π/2) ├┤ RX(ϴ) ├»
└───┘└──────┘└───┘└───────┘└─────────┘└─────────┘└─────────┘└───────┘»
« ┌──────────┐
«q_0: ┤0 ├─────────────────────────────────
« │ RZX(-ϴ) │┌─────────┐┌─────────┐┌─────────┐
«q_1: ┤1 ├┤ RZ(π/2) ├┤ RX(π/2) ├┤ RZ(π/2) ├
« └──────────┘└─────────┘└─────────┘└─────────┘
Parameters
theta (ParameterValueType | None) –
rzx_zz3
qiskit.circuit.library.rzx_zz3(theta=None)
RZX-based template for CX - RZGate - CX.
»
q_0: ──■─────────────■──────────────────────────────────────────────────────»
┌─┴─┐┌───────┐┌─┴─┐┌────────┐┌─────────┐┌─────────┐┌─────────┐┌───────┐»
q_1: ┤ X ├┤ RZ(ϴ) ├┤ X ├┤ RZ(-ϴ) ├┤ RZ(π/2) ├┤ RX(π/2) ├┤ RZ(π/2) ├┤ RX(ϴ) ├»
└───┘└───────┘└───┘└────────┘└─────────┘└─────────┘└─────────┘└───────┘»
« ┌──────────┐
«q_0: ┤0 ├─────────────────────────────────
« │ RZX(-ϴ) │┌─────────┐┌─────────┐┌─────────┐
«q_1: ┤1 ├┤ RZ(π/2) ├┤ RX(π/2) ├┤ RZ(π/2) ├
« └──────────┘└─────────┘└─────────┘└─────────┘
Parameters
theta (ParameterValueType | None) –