GMS

class GMS(num_qubits, theta)[source]

Global Mølmer–Sørensen gate.

Circuit symbol:

     ┌───────────┐
q_0: ┤0          ├
     │           │
q_1: ┤1   GMS    ├
     │           │
q_2: ┤2          ├
     └───────────┘

Expanded Circuit:

The Mølmer–Sørensen gate is native to ion-trap systems. The global MS can be applied to multiple ions to entangle multiple qubits simultaneously [1].

In the two-qubit case, this is equivalent to an XX(theta) interaction, and is thus reduced to the RXXGate. The global MS gate is a sum of XX interactions on all pairs [2].

\[GMS(\chi_{12}, \chi_{13}, ..., \chi_{n-1 n}) = exp(-i \sum_{i=1}^{n} \sum_{j=i+1}^{n} X{\otimes}X \frac{\chi_{ij}}{2})\]

References:

[1] Sørensen, A. and Mølmer, K., Multi-particle entanglement of hot trapped ions. Physical Review Letters. 82 (9): 1835–1838. arXiv:9810040

[2] Maslov, D. and Nam, Y., Use of global interactions in efficient quantum circuit constructions. New Journal of Physics, 20(3), p.033018. arXiv:1707.06356

Create a new Global Mølmer–Sørensen (GMS) gate.

Parameters
  • num_qubits (int) – width of gate.

  • theta (Union[List[List[float]], ndarray]) – a num_qubits x num_qubits symmetric matrix of interaction angles for each qubit pair. The upper triangle is considered.

Attributes

GMS.ancillas

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

GMS.calibrations

Return calibration dictionary.

GMS.clbits

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

GMS.data

Return the circuit data (instructions and context).

GMS.extension_lib

GMS.global_phase

Return the global phase of the circuit in radians.

GMS.header

GMS.instances

GMS.num_ancillas

Return the number of ancilla qubits.

GMS.num_clbits

Return number of classical bits.

GMS.num_parameters

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

GMS.num_qubits

Return number of qubits.

GMS.parameters

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

GMS.prefix

GMS.qubits

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

Methods

GMS.__getitem__(item)

Return indexed operation.

GMS.__len__()

Return number of operations in circuit.

GMS.add_calibration(gate, qubits, schedule)

Register a low-level, custom pulse definition for the given gate.

GMS.add_register(*regs)

Add registers.

GMS.append(instruction[, qargs, cargs])

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

GMS.assign_parameters(param_dict[, inplace])

Assign parameters to new parameters or values.

GMS.barrier(*qargs)

Apply Barrier.

GMS.bind_parameters(value_dict)

Assign numeric parameters to values yielding a new circuit.

GMS.cast(value, _type)

Best effort to cast value to type.

GMS.cbit_argument_conversion(…)

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

GMS.ccx(control_qubit1, control_qubit2, …)

Apply CCXGate.

GMS.ch(control_qubit, target_qubit[, label, …])

Apply CHGate.

GMS.cls_instances()

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

GMS.cls_prefix()

Return the prefix to use for auto naming.

GMS.cnot(control_qubit, target_qubit[, …])

Apply CXGate.

GMS.combine(rhs)

Append rhs to self if self contains compatible registers.

GMS.compose(other[, qubits, clbits, front, …])

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

GMS.control([num_ctrl_qubits, label, ctrl_state])

Control this circuit on num_ctrl_qubits qubits.

GMS.copy([name])

Copy the circuit.

GMS.count_ops()

Count each operation kind in the circuit.

GMS.cp(theta, control_qubit, target_qubit[, …])

Apply CPhaseGate.

GMS.crx(theta, control_qubit, target_qubit)

Apply CRXGate.

GMS.cry(theta, control_qubit, target_qubit)

Apply CRYGate.

GMS.crz(theta, control_qubit, target_qubit)

Apply CRZGate.

GMS.cswap(control_qubit, target_qubit1, …)

Apply CSwapGate.

GMS.csx(control_qubit, target_qubit[, …])

Apply CSXGate.

GMS.cu(theta, phi, lam, gamma, …[, label, …])

Apply CUGate.

GMS.cu1(theta, control_qubit, target_qubit)

Apply CU1Gate.

GMS.cu3(theta, phi, lam, control_qubit, …)

Apply CU3Gate.

GMS.cx(control_qubit, target_qubit[, label, …])

Apply CXGate.

GMS.cy(control_qubit, target_qubit[, label, …])

Apply CYGate.

GMS.cz(control_qubit, target_qubit[, label, …])

Apply CZGate.

GMS.dcx(qubit1, qubit2)

Apply DCXGate.

GMS.decompose()

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

GMS.delay(duration[, qarg, unit])

Apply Delay.

GMS.depth()

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

GMS.diag_gate(diag, qubit)

Deprecated version of QuantumCircuit.diagonal.

GMS.diagonal(diag, qubit)

Attach a diagonal gate to a circuit.

GMS.draw([output, scale, filename, style, …])

Draw the quantum circuit.

GMS.extend(rhs)

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

GMS.fredkin(control_qubit, target_qubit1, …)

Apply CSwapGate.

GMS.from_qasm_file(path)

Take in a QASM file and generate a QuantumCircuit object.

GMS.from_qasm_str(qasm_str)

Take in a QASM string and generate a QuantumCircuit object.

GMS.h(qubit)

Apply HGate.

GMS.hamiltonian(operator, time, qubits[, label])

Apply hamiltonian evolution to to qubits.

GMS.has_register(register)

Test if this circuit has the register r.

GMS.i(qubit)

Apply IGate.

GMS.id(qubit)

Apply IGate.

GMS.initialize(params, qubits)

Apply initialize to circuit.

GMS.inverse()

Invert (take adjoint of) this circuit.

GMS.iso(isometry, q_input, q_ancillas_for_output)

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

GMS.isometry(isometry, q_input, …[, …])

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

GMS.iswap(qubit1, qubit2)

Apply iSwapGate.

GMS.mcmt(gate, control_qubits, target_qubits)

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

GMS.mcp(lam, control_qubits, target_qubit)

Apply MCPhaseGate.

GMS.mcrx(theta, q_controls, q_target[, …])

Apply Multiple-Controlled X rotation gate

GMS.mcry(theta, q_controls, q_target, q_ancillae)

Apply Multiple-Controlled Y rotation gate

GMS.mcrz(lam, q_controls, q_target[, …])

Apply Multiple-Controlled Z rotation gate

GMS.mct(control_qubits, target_qubit[, …])

Apply MCXGate.

GMS.mcu1(lam, control_qubits, target_qubit)

Apply MCU1Gate.

GMS.mcx(control_qubits, target_qubit[, …])

Apply MCXGate.

GMS.measure(qubit, cbit)

Measure quantum bit into classical bit (tuples).

GMS.measure_active([inplace])

Adds measurement to all non-idle qubits.

GMS.measure_all([inplace])

Adds measurement to all qubits.

GMS.mirror()

DEPRECATED: use circuit.reverse_ops().

GMS.ms(theta, qubits)

Apply MSGate.

GMS.num_connected_components([unitary_only])

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

GMS.num_nonlocal_gates()

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

GMS.num_tensor_factors()

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

GMS.num_unitary_factors()

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

GMS.p(theta, qubit)

Apply PhaseGate.

GMS.power(power[, matrix_power])

Raise this circuit to the power of power.

GMS.qasm([formatted, filename])

Return OpenQASM string.

GMS.qbit_argument_conversion(…)

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

GMS.qubit_duration(*qubits)

Return the duration between the start and stop time of the first and last instructions, excluding delays, over the supplied qubits.

GMS.qubit_start_time(*qubits)

Return the start time of the first instruction, excluding delays, over the supplied qubits.

GMS.qubit_stop_time(*qubits)

Return the stop time of the last instruction, excluding delays, over the supplied qubits.

GMS.r(theta, phi, qubit)

Apply RGate.

GMS.rcccx(control_qubit1, control_qubit2, …)

Apply RC3XGate.

GMS.rccx(control_qubit1, control_qubit2, …)

Apply RCCXGate.

GMS.remove_final_measurements([inplace])

Removes final measurement on all qubits if they are present.

GMS.repeat(reps)

Repeat this circuit reps times.

GMS.reset(qubit)

Reset q.

GMS.reverse_bits()

Return a circuit with the opposite order of wires.

GMS.reverse_ops()

Reverse the circuit by reversing the order of instructions.

GMS.rx(theta, qubit[, label])

Apply RXGate.

GMS.rxx(theta, qubit1, qubit2)

Apply RXXGate.

GMS.ry(theta, qubit[, label])

Apply RYGate.

GMS.ryy(theta, qubit1, qubit2)

Apply RYYGate.

GMS.rz(phi, qubit)

Apply RZGate.

GMS.rzx(theta, qubit1, qubit2)

Apply RZXGate.

GMS.rzz(theta, qubit1, qubit2)

Apply RZZGate.

GMS.s(qubit)

Apply SGate.

GMS.sdg(qubit)

Apply SdgGate.

GMS.size()

Returns total number of gate operations in circuit.

GMS.snapshot(label[, snapshot_type, qubits, …])

Take a statevector snapshot of the internal simulator representation.

GMS.snapshot_density_matrix(label[, qubits])

Take a density matrix snapshot of simulator state.

GMS.snapshot_expectation_value(label, op, qubits)

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

GMS.snapshot_probabilities(label, qubits[, …])

Take a probability snapshot of the simulator state.

GMS.snapshot_stabilizer(label)

Take a stabilizer snapshot of the simulator state.

GMS.snapshot_statevector(label)

Take a statevector snapshot of the simulator state.

GMS.squ(unitary_matrix, qubit[, mode, …])

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

GMS.swap(qubit1, qubit2)

Apply SwapGate.

GMS.sx(qubit)

Apply SXGate.

GMS.sxdg(qubit)

Apply SXdgGate.

GMS.t(qubit)

Apply TGate.

GMS.tdg(qubit)

Apply TdgGate.

GMS.to_gate([parameter_map, label])

Create a Gate out of this circuit.

GMS.to_instruction([parameter_map])

Create an Instruction out of this circuit.

GMS.toffoli(control_qubit1, control_qubit2, …)

Apply CCXGate.

GMS.u(theta, phi, lam, qubit)

Apply UGate.

GMS.u1(theta, qubit)

Apply U1Gate.

GMS.u2(phi, lam, qubit)

Apply U2Gate.

GMS.u3(theta, phi, lam, qubit)

Apply U3Gate.

GMS.uc(gate_list, q_controls, q_target[, …])

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

GMS.ucrx(angle_list, q_controls, q_target)

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

GMS.ucry(angle_list, q_controls, q_target)

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

GMS.ucrz(angle_list, q_controls, q_target)

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

GMS.unitary(obj, qubits[, label])

Apply unitary gate to q.

GMS.width()

Return number of qubits plus clbits in circuit.

GMS.x(qubit[, label])

Apply XGate.

GMS.y(qubit)

Apply YGate.

GMS.z(qubit)

Apply ZGate.

GMS.__getitem__(item)

Return indexed operation.

GMS.__len__()

Return number of operations in circuit.