FunctionalPauliRotations

class FunctionalPauliRotations(num_state_qubits=None, basis='Y', name='F')[source]

Base class for functional Pauli rotations.

Create a new functional Pauli rotation circuit.

Parameters
  • num_state_qubits (Optional[int]) – The number of qubits representing the state \(|x\rangle\).

  • basis (str) – The kind of Pauli rotation to use. Must be ‘X’, ‘Y’ or ‘Z’.

  • name (str) – The name of the circuit object.

Attributes

FunctionalPauliRotations.ancillas

Returns a list of ancilla bits in the order that the registers were added.

FunctionalPauliRotations.basis

The kind of Pauli rotation to be used.

FunctionalPauliRotations.clbits

Returns a list of classical bits in the order that the registers were added.

FunctionalPauliRotations.data

Return the circuit data (instructions and context).

FunctionalPauliRotations.extension_lib

FunctionalPauliRotations.global_phase

Return the global phase of the circuit in radians.

FunctionalPauliRotations.header

FunctionalPauliRotations.instances

FunctionalPauliRotations.n_qubits

Deprecated, use num_qubits instead.

FunctionalPauliRotations.num_ancilla_qubits

The minimum number of ancilla qubits in the circuit.

FunctionalPauliRotations.num_ancillas

Return the number of ancilla qubits.

FunctionalPauliRotations.num_clbits

Return number of classical bits.

FunctionalPauliRotations.num_parameters

Convenience function to get the number of parameter objects in the circuit.

FunctionalPauliRotations.num_qubits

Return number of qubits.

FunctionalPauliRotations.num_state_qubits

The number of state qubits representing the state \(|x\rangle\).

FunctionalPauliRotations.parameters

Convenience function to get the parameters defined in the parameter table.

FunctionalPauliRotations.prefix

FunctionalPauliRotations.qregs

A list of the quantum registers associated with the circuit.

FunctionalPauliRotations.qubits

Returns a list of quantum bits in the order that the registers were added.

Methods

FunctionalPauliRotations.AND(qr_variables, …)

Build a collective conjunction (AND) circuit in place using mct.

FunctionalPauliRotations.OR(qr_variables, …)

Build a collective disjunction (OR) circuit in place using mct.

FunctionalPauliRotations.__getitem__(item)

Return indexed operation.

FunctionalPauliRotations.__len__()

Return number of operations in circuit.

FunctionalPauliRotations.add_register(*regs)

Add registers.

FunctionalPauliRotations.append(instruction)

Append one or more instructions to the end of the circuit, modifying the circuit in place.

FunctionalPauliRotations.assign_parameters(…)

Assign parameters to new parameters or values.

FunctionalPauliRotations.barrier(*qargs)

Apply Barrier.

FunctionalPauliRotations.bind_parameters(…)

Assign numeric parameters to values yielding a new circuit.

FunctionalPauliRotations.cast(value, _type)

Best effort to cast value to type.

FunctionalPauliRotations.cbit_argument_conversion(…)

Converts several classical bit representations (such as indexes, range, etc.) into a list of classical bits.

FunctionalPauliRotations.ccx(control_qubit1, …)

Apply CCXGate.

FunctionalPauliRotations.ch(control_qubit, …)

Apply CHGate.

FunctionalPauliRotations.cls_instances()

Return the current number of instances of this class, useful for auto naming.

FunctionalPauliRotations.cls_prefix()

Return the prefix to use for auto naming.

FunctionalPauliRotations.cnot(control_qubit, …)

Apply CXGate.

FunctionalPauliRotations.combine(rhs)

Append rhs to self if self contains compatible registers.

FunctionalPauliRotations.compose(other[, …])

Compose circuit with other circuit or instruction, optionally permuting wires.

FunctionalPauliRotations.control([…])

Control this circuit on num_ctrl_qubits qubits.

FunctionalPauliRotations.copy([name])

Copy the circuit.

FunctionalPauliRotations.count_ops()

Count each operation kind in the circuit.

FunctionalPauliRotations.cp(theta, …[, …])

Apply CPhaseGate.

FunctionalPauliRotations.crx(theta, …[, …])

Apply CRXGate.

FunctionalPauliRotations.cry(theta, …[, …])

Apply CRYGate.

FunctionalPauliRotations.crz(theta, …[, …])

Apply CRZGate.

FunctionalPauliRotations.cswap(…[, label, …])

Apply CSwapGate.

FunctionalPauliRotations.csx(control_qubit, …)

Apply CSXGate.

FunctionalPauliRotations.cu(theta, phi, lam, …)

Apply CUGate.

FunctionalPauliRotations.cu1(theta, …[, …])

Apply CU1Gate.

FunctionalPauliRotations.cu3(theta, phi, …)

Apply CU3Gate.

FunctionalPauliRotations.cx(control_qubit, …)

Apply CXGate.

FunctionalPauliRotations.cy(control_qubit, …)

Apply CYGate.

FunctionalPauliRotations.cz(control_qubit, …)

Apply CZGate.

FunctionalPauliRotations.dcx(qubit1, qubit2)

Apply DCXGate.

FunctionalPauliRotations.decompose()

Call a decomposition pass on this circuit, to decompose one level (shallow decompose).

FunctionalPauliRotations.depth()

Return circuit depth (i.e., length of critical path).

FunctionalPauliRotations.diag_gate(diag, qubit)

Deprecated version of QuantumCircuit.diagonal.

FunctionalPauliRotations.diagonal(diag, qubit)

Attach a diagonal gate to a circuit.

FunctionalPauliRotations.draw([output, …])

Draw the quantum circuit.

FunctionalPauliRotations.extend(rhs)

Append QuantumCircuit to the right hand side if it contains compatible registers.

FunctionalPauliRotations.fredkin(…[, ctl, …])

Apply CSwapGate.

FunctionalPauliRotations.from_qasm_file(path)

Take in a QASM file and generate a QuantumCircuit object.

FunctionalPauliRotations.from_qasm_str(qasm_str)

Take in a QASM string and generate a QuantumCircuit object.

FunctionalPauliRotations.h(qubit, *[, q])

Apply HGate.

FunctionalPauliRotations.hamiltonian(…[, …])

Apply hamiltonian evolution to to qubits.

FunctionalPauliRotations.has_register(register)

Test if this circuit has the register r.

FunctionalPauliRotations.i(qubit, *[, q])

Apply IGate.

FunctionalPauliRotations.id(qubit, *[, q])

Apply IGate.

FunctionalPauliRotations.iden(qubit, *[, q])

Deprecated identity gate.

FunctionalPauliRotations.initialize(params, …)

Apply initialize to circuit.

FunctionalPauliRotations.inverse()

Invert (take adjoint of) this circuit.

FunctionalPauliRotations.iso(isometry, …)

Attach an arbitrary isometry from m to n qubits to a circuit.

FunctionalPauliRotations.isometry(isometry, …)

Attach an arbitrary isometry from m to n qubits to a circuit.

FunctionalPauliRotations.iswap(qubit1, qubit2)

Apply iSwapGate.

FunctionalPauliRotations.mcmt(gate, …[, …])

Apply a multi-control, multi-target using a generic gate.

FunctionalPauliRotations.mcrx(theta, …[, …])

Apply Multiple-Controlled X rotation gate

FunctionalPauliRotations.mcry(theta, …[, …])

Apply Multiple-Controlled Y rotation gate

FunctionalPauliRotations.mcrz(lam, …[, …])

Apply Multiple-Controlled Z rotation gate

FunctionalPauliRotations.mct(control_qubits, …)

Apply MCXGate.

FunctionalPauliRotations.mcu1(lam, …)

Apply MCU1Gate.

FunctionalPauliRotations.mcx(control_qubits, …)

Apply MCXGate.

FunctionalPauliRotations.measure(qubit, cbit)

Measure quantum bit into classical bit (tuples).

FunctionalPauliRotations.measure_active([…])

Adds measurement to all non-idle qubits.

FunctionalPauliRotations.measure_all([inplace])

Adds measurement to all qubits.

FunctionalPauliRotations.mirror()

DEPRECATED: use circuit.reverse_ops().

FunctionalPauliRotations.ms(theta, qubits)

Apply MSGate.

FunctionalPauliRotations.num_connected_components([…])

How many non-entangled subcircuits can the circuit be factored to.

FunctionalPauliRotations.num_nonlocal_gates()

Return number of non-local gates (i.e.

FunctionalPauliRotations.num_tensor_factors()

Computes the number of tensor factors in the unitary (quantum) part of the circuit only.

FunctionalPauliRotations.num_unitary_factors()

Computes the number of tensor factors in the unitary (quantum) part of the circuit only.

FunctionalPauliRotations.p(theta, qubit)

Apply PhaseGate.

FunctionalPauliRotations.power(power[, …])

Raise this circuit to the power of power.

FunctionalPauliRotations.qasm([formatted, …])

Return OpenQASM string.

FunctionalPauliRotations.qbit_argument_conversion(…)

Converts several qubit representations (such as indexes, range, etc.) into a list of qubits.

FunctionalPauliRotations.r(theta, phi, qubit, *)

Apply RGate.

FunctionalPauliRotations.rcccx(…)

Apply RC3XGate.

FunctionalPauliRotations.rccx(…)

Apply RCCXGate.

FunctionalPauliRotations.remove_final_measurements([…])

Removes final measurement on all qubits if they are present.

FunctionalPauliRotations.repeat(reps)

Repeat this circuit reps times.

FunctionalPauliRotations.reset(qubit)

Reset q.

FunctionalPauliRotations.reverse_bits()

Return a circuit with the opposite order of wires.

FunctionalPauliRotations.reverse_ops()

Reverse the circuit by reversing the order of instructions.

FunctionalPauliRotations.rx(theta, qubit, *)

Apply RXGate.

FunctionalPauliRotations.rxx(theta, qubit1, …)

Apply RXXGate.

FunctionalPauliRotations.ry(theta, qubit, *)

Apply RYGate.

FunctionalPauliRotations.ryy(theta, qubit1, …)

Apply RYYGate.

FunctionalPauliRotations.rz(phi, qubit, *[, q])

Apply RZGate.

FunctionalPauliRotations.rzx(theta, qubit1, …)

Apply RZXGate.

FunctionalPauliRotations.rzz(theta, qubit1, …)

Apply RZZGate.

FunctionalPauliRotations.s(qubit, *[, q])

Apply SGate.

FunctionalPauliRotations.sdg(qubit, *[, q])

Apply SdgGate.

FunctionalPauliRotations.size()

Returns total number of gate operations in circuit.

FunctionalPauliRotations.snapshot(label[, …])

Take a statevector snapshot of the internal simulator representation.

FunctionalPauliRotations.snapshot_density_matrix(label)

Take a density matrix snapshot of simulator state.

FunctionalPauliRotations.snapshot_expectation_value(…)

Take a snapshot of expectation value <O> of an Operator.

FunctionalPauliRotations.snapshot_probabilities(…)

Take a probability snapshot of the simulator state.

FunctionalPauliRotations.snapshot_stabilizer(label)

Take a stabilizer snapshot of the simulator state.

FunctionalPauliRotations.snapshot_statevector(label)

Take a statevector snapshot of the simulator state.

FunctionalPauliRotations.squ(unitary_matrix, …)

Decompose an arbitrary 2*2 unitary into three rotation gates.

FunctionalPauliRotations.swap(qubit1, qubit2)

Apply SwapGate.

FunctionalPauliRotations.sx(qubit)

Apply SXGate.

FunctionalPauliRotations.sxdg(qubit)

Apply SXdgGate.

FunctionalPauliRotations.t(qubit, *[, q])

Apply TGate.

FunctionalPauliRotations.tdg(qubit, *[, q])

Apply TdgGate.

FunctionalPauliRotations.to_gate([…])

Create a Gate out of this circuit.

FunctionalPauliRotations.to_instruction([…])

Create an Instruction out of this circuit.

FunctionalPauliRotations.toffoli(…[, …])

Apply CCXGate.

FunctionalPauliRotations.u(theta, phi, lam, …)

Apply UGate.

FunctionalPauliRotations.u1(theta, qubit, *)

Apply U1Gate.

FunctionalPauliRotations.u2(phi, lam, qubit, *)

Apply U2Gate.

FunctionalPauliRotations.u3(theta, phi, lam, …)

Apply U3Gate.

FunctionalPauliRotations.uc(gate_list, …)

Attach a uniformly controlled gates (also called multiplexed gates) to a circuit.

FunctionalPauliRotations.ucg(angle_list, …)

Deprecated version of uc.

FunctionalPauliRotations.ucrx(angle_list, …)

Attach a uniformly controlled (also called multiplexed) Rx rotation gate to a circuit.

FunctionalPauliRotations.ucry(angle_list, …)

Attach a uniformly controlled (also called multiplexed) Ry rotation gate to a circuit.

FunctionalPauliRotations.ucrz(angle_list, …)

Attach a uniformly controlled (also called multiplexed gates) Rz rotation gate to a circuit.

FunctionalPauliRotations.ucx(angle_list, …)

Deprecated version of ucrx.

FunctionalPauliRotations.ucy(angle_list, …)

Deprecated version of ucry.

FunctionalPauliRotations.ucz(angle_list, …)

Deprecated version of ucrz.

FunctionalPauliRotations.unitary(obj, qubits)

Apply unitary gate to q.

FunctionalPauliRotations.width()

Return number of qubits plus clbits in circuit.

FunctionalPauliRotations.x(qubit, *[, …])

Apply XGate.

FunctionalPauliRotations.y(qubit, *[, q])

Apply YGate.

FunctionalPauliRotations.z(qubit, *[, q])

Apply ZGate.

FunctionalPauliRotations.__getitem__(item)

Return indexed operation.

FunctionalPauliRotations.__len__()

Return number of operations in circuit.