LinearSystemMatrix¶
- class LinearSystemMatrix(num_state_qubits, tolerance, evolution_time, name='ls_matrix')[ソース]¶
ベースクラス:
BlueprintCircuit
,ABC
The deprecated base class for linear system matrices.
- パラメータ
num_state_qubits (
int
) – the number of qubits where the unitary acts.tolerance (
float
) – the accuracy desired for the approximationevolution_time (
float
) – the time of the Hamiltonian simulationname (
str
) – The name of the object.
Methods
Add Bits to the circuit.
Register a low-level, custom pulse definition for the given gate.
Add registers.
Append one or more instructions to the end of the circuit, modifying the circuit in place.
Assign parameters to new parameters or values.
Apply
Barrier
.Assign numeric parameters to values yielding a new circuit.
Apply
BreakLoopOp
.Best effort to cast value to type.
Converts several classical bit representations (such as indexes, range, etc.) into a list of classical bits.
Apply
CCXGate
.Apply
CCZGate
.Apply
CHGate
.Clear all instructions in self.
Return the current number of instances of this class, useful for auto naming.
Return the prefix to use for auto naming.
Apply
CXGate
.DEPRECATED - Returns rhs appended to self if self contains compatible registers.
Compose circuit with
other
circuit or instruction, optionally permuting wires.Return lower and upper bounds on the condition number of the matrix.
Apply
ContinueLoopOp
.Control this circuit on
num_ctrl_qubits
qubits.Copy the circuit.
Return a copy of self with the same structure but empty.
Count each operation kind in the circuit.
Apply
CPhaseGate
.Apply
CRXGate
.Apply
CRYGate
.Apply
CRZGate
.Apply
CSGate
.Apply
CSdgGate
.Apply
CSwapGate
.Apply
CSXGate
.Apply
CUGate
.Apply
CU1Gate
.Apply
CU3Gate
.Apply
CXGate
.Apply
CYGate
.Apply
CZGate
.Apply
DCXGate
.Call a decomposition pass on this circuit, to decompose one level (shallow decompose).
Apply
Delay
.Return circuit depth (i.e., length of critical path).
Attach a diagonal gate to a circuit.
Draw the quantum circuit.
Apply
ECRGate
.Return lower and upper bounds on the eigenvalues of the matrix.
DEPRECATED - Append QuantumCircuit to the RHS if it contains compatible registers.
Find locations in the circuit which can be used to reference a given
Bit
.Create a
for
loop on this circuit.Apply
CSwapGate
.Take in a QASM file and generate a QuantumCircuit object.
Take in a QASM string and generate a QuantumCircuit object.
Get instructions matching name.
Apply
HGate
.Apply hamiltonian evolution to qubits.
Return True if the circuit has a calibration defined for the instruction context.
Test if this circuit has the register r.
Apply
IGate
.Apply
IGate
.Apply
IfElseOp
.Create an
if
statement on this circuit.Initialize qubits in a specific state.
Invert (take adjoint of) this circuit.
Attach an arbitrary isometry from m to n qubits to a circuit.
Attach an arbitrary isometry from m to n qubits to a circuit.
Apply
iSwapGate
.Apply
MCPhaseGate
.Apply Multiple-Controlled X rotation gate
Apply Multiple-Controlled Y rotation gate
Apply Multiple-Controlled Z rotation gate
Apply
MCXGate
.Apply
MCU1Gate
.Apply
MCXGate
.Measure quantum bit into classical bit (tuples).
Adds measurement to all non-idle qubits.
Adds measurement to all qubits.
Apply
MSGate
.How many non-entangled subcircuits can the circuit be factored to.
Return number of non-local gates (i.e.
Computes the number of tensor factors in the unitary (quantum) part of the circuit only.
Computes the number of tensor factors in the unitary (quantum) part of the circuit only.
Apply
PhaseGate
.Apply
PauliGate
.Build powers of the circuit.
Prepare qubits in a specific state.
Return OpenQASM string.
Converts several qubit representations (such as indexes, range, etc.) into a list of qubits.
Return the duration between the start and stop time of the first and last instructions, excluding delays, over the supplied qubits.
Return the start time of the first instruction, excluding delays, over the supplied qubits.
Return the stop time of the last instruction, excluding delays, over the supplied qubits.
Apply
RGate
.Apply
RC3XGate
.Apply
RCCXGate
.Removes final measurements and barriers on all qubits if they are present.
Repeat this circuit
reps
times.Reset the quantum bit(s) to their default state.
Return a circuit with the opposite order of wires.
Reverse the circuit by reversing the order of instructions.
Apply
RVGate
.Apply
RXGate
.Apply
RXXGate
.Apply
RYGate
.Apply
RYYGate
.Apply
RZGate
.Apply
RZXGate
.Apply
RZZGate
.Apply
SGate
.Save complex statevector amplitudes.
Save squared statevector amplitudes (probabilities).
Save the current stabilizer simulator quantum state as a Clifford.
Save the current simulator quantum state as a density matrix.
Save the expectation value of a Hermitian operator.
Save the expectation value of a Hermitian operator.
Save the current simulator quantum state as a matrix product state.
Save measurement outcome probabilities vector.
Save measurement outcome probabilities vector.
Save the current stabilizer simulator quantum state as a StabilizerState.
Save the current simulator quantum state.
Save the current simulator quantum state as a statevector.
Save the current simulator quantum state as a statevector as a dict.
Save the current state of the superop simulator.
Save the current state of the unitary simulator.
Apply
SdgGate
.Set the density matrix state of the simulator.
Set the matrix product state of the simulator.
Set the Clifford stabilizer state of the simulator.
Set the statevector state of the simulator.
Set the superop state of the simulator.
Set the state state of the simulator.
Returns total number of instructions in circuit.
Take a statevector snapshot of the internal simulator representation.
Decompose an arbitrary 2*2 unitary into three rotation gates.
Apply
SwapGate
.Apply
SXGate
.Apply
SXdgGate
.Apply
TGate
.Apply
TdgGate
.Tensor
self
withother
.Create a Gate out of this circuit.
Create an Instruction out of this circuit.
Apply
CCXGate
.Apply
UGate
.Apply
U1Gate
.Apply
U2Gate
.Apply
U3Gate
.Attach a uniformly controlled gates (also called multiplexed gates) to a circuit.
Attach a uniformly controlled (also called multiplexed) Rx rotation gate to a circuit.
Attach a uniformly controlled (also called multiplexed) Ry rotation gate to a circuit.
Attach a uniformly controlled (also called multiplexed gates) Rz rotation gate to a circuit.
Apply unitary gate specified by
obj
toqubits
.Create a
while
loop on this circuit.Return number of qubits plus clbits in circuit.
Apply
XGate
.Apply
YGate
.Apply
ZGate
.Attributes
- ancillas¶
Returns a list of ancilla bits in the order that the registers were added.
- 戻り値の型
List
[AncillaQubit
]
- calibrations¶
Return calibration dictionary.
- The custom pulse definition of a given gate is of the form
{『gate_name』: {(qubits, params): schedule}}
- 戻り値の型
dict
- clbits¶
Returns a list of classical bits in the order that the registers were added.
- 戻り値の型
List
[Clbit
]
- data¶
- evolution_time¶
Return the time of the evolution.
- 戻り値の型
float
- extension_lib = 'include "qelib1.inc";'¶
- global_phase¶
Return the global phase of the circuit in radians.
- 戻り値の型
Union
[ParameterExpression
,float
]
- header = 'OPENQASM 2.0;'¶
- instances = 94¶
- metadata¶
The user provided metadata associated with the circuit
The metadata for the circuit is a user provided
dict
of metadata for the circuit. It will not be used to influence the execution or operation of the circuit, but it is expected to be passed between all transforms of the circuit (ie transpilation) and that providers will associate any circuit metadata with the results it returns from execution of that circuit.- 戻り値の型
dict
- num_ancillas¶
Return the number of ancilla qubits.
- 戻り値の型
int
- num_clbits¶
Return number of classical bits.
- 戻り値の型
int
- num_parameters¶
- 戻り値の型
int
- num_qubits¶
Return number of qubits.
- 戻り値の型
int
- num_state_qubits¶
The number of state qubits representing the state \(|x\rangle\).
- 戻り値の型
int
- 戻り値
The number of state qubits.
- op_start_times¶
Return a list of operation start times.
This attribute is enabled once one of scheduling analysis passes runs on the quantum circuit.
- 戻り値の型
List
[int
]- 戻り値
List of integers representing instruction start times. The index corresponds to the index of instruction in
QuantumCircuit.data
.- 例外
AttributeError – When circuit is not scheduled.
- parameters¶
- 戻り値の型
ParameterView
- prefix = 'circuit'¶
- qregs¶
A list of the quantum registers associated with the circuit.
- qubits¶
Returns a list of quantum bits in the order that the registers were added.
- 戻り値の型
List
[Qubit
]
- tolerance¶
Return the error tolerance
- 戻り値の型
float