iqm.iqm_client.models

iqm.iqm_client.models#

This module contains the data models used by IQMClient.

We currently support the following native operations for circuit execution, represented by iqm.pulse.CircuitOperation:

name

# of qubits

args

description

measure

>= 1

key: str, feedback_key: str

Measurement in the Z basis.

prx

1

angle: float, phase: float

Phased x-rotation gate.

cc_prx

1

angle: float, phase: float, feedback_qubit: str, feedback_key: str

Classically controlled PRX gate.

reset

>= 1

Reset the qubit(s) to \(|0\rangle\).

cz

2

Controlled-Z gate.

move

2

Move a qubit state between a qubit and a computational resonator, as long as at least one of the components is in the \(|0\rangle\) state.

barrier

>= 1

Execution barrier.

delay

>= 1

duration: float

Force a delay between circuit operations.

Measure#

iqm.pulse.gates.measure

Measurement in the computational (Z) basis. The measurement results are the output of the circuit. Takes two string arguments: key, denoting the measurement key the returned results are labeled with, and feedback_key, which is only needed if the measurement result is used for classical control within the circuit. All the measurement keys and feedback keys used in a circuit must be unique (but the two groups of keys are independent namespaces). Each qubit may be measured multiple times, i.e. mid-circuit measurements are allowed.

Example#
CircuitOperation(name='measure', locus=('alice', 'bob', 'charlie'), args={'key': 'm1'})

PRX#

iqm.pulse.gates.prx

Phased x-rotation gate, i.e. an x-rotation conjugated by a z-rotation. Takes two arguments, the rotation angle angle and the phase angle phase, both measured in units of radians. The gate is represented in the standard computational basis by the matrix

\[\text{PRX}(\theta, \phi) = \exp(-i (X \cos (\phi) + Y \sin (\phi)) \: \theta/2) = \text{RZ}(\phi) \: \text{RX}(\theta) \: \text{RZ}^\dagger(\phi),\]

where \(\theta\) = angle, \(\phi\) = phase, and \(X\) and \(Y\) are Pauli matrices.

Example#
CircuitOperation(name='prx', locus=('bob',), args={'angle': 1.4 * pi, 'phase': 0.5 * pi})

CC_PRX#

iqm.pulse.gates.conditional

Classically controlled PRX gate. Takes four arguments. angle and phase are exactly as in PRX. feedback_key is a string that identifies the measure instruction whose result controls the gate (the one that shares the feedback key). feedback_qubit is the name of the physical qubit within the measure instruction that produces the feedback. If the measurement result is 1, the PRX gate is applied. If it is 0, an identity gate of similar time duration gate is applied instead. The measurement instruction must precede the classically controlled gate instruction in the quantum circuit.

Reset#

iqm.pulse.gates.reset

Resets the qubit(s) non-unitarily to the \(|0\rangle\) state.

Example#
CircuitOperation(name='reset', locus=('alice', 'bob'), args={})

Note

Currently inherits its calibration from cc_prx and is only available when cc_prx is.

CZ#

iqm.pulse.gates.cz

Controlled-Z gate. Represented in the standard computational basis by the matrix

\[\text{CZ} = \text{diag}(1, 1, 1, -1).\]

It is symmetric wrt. the qubits it’s acting on, and takes no arguments.

Example#
CircuitOperation(name='cz', locus=('alice', 'bob'), args={})

MOVE#

iqm.pulse.gates.move

The MOVE operation is a unitary population exchange operation between a qubit and a resonator. Its effect is only defined in the invariant subspace \(S = \text{span}\{|00\rangle, |01\rangle, |10\rangle\}\), where it swaps the populations of the states \(|01\rangle\) and \(|10\rangle\). Its effect on the orthogonal subspace is undefined.

MOVE has the following presentation in the subspace \(S\):

\[\text{MOVE}_S = |00\rangle \langle 00| + a |10\rangle \langle 01| + a^{-1} |01\rangle \langle 10|,\]

where \(a\) is an undefined complex phase that is canceled when the MOVE gate is applied a second time.

To ensure that the state of the qubit and resonator has no overlap with \(|11\rangle\), it is recommended that no single qubit gates are applied to the qubit in between a pair of MOVE operations.

Example#
CircuitOperation(name='move', locus=('alice', 'resonator'), args={})

Note

MOVE is only available in quantum computers with the IQM Star architecture.

Barrier#

iqm.pulse.gates.barrier

Affects the physical execution order of the instructions elsewhere in the circuit that act on qubits spanned by the barrier. It ensures that any such instructions that succeed the barrier are only executed after all such instructions that precede the barrier have been completed. Hence it can be used to guarantee a specific causal order for the other instructions. It takes no arguments, and has no other effect.

Example#
CircuitOperation(name='barrier', locus=('alice', 'bob'), args={})

Note

One-qubit barriers will not have any effect on circuit’s compilation and execution. Higher layers that sit on top of IQM Client can make actual use of one-qubit barriers (e.g. during circuit optimization), therefore having them is allowed.

Delay#

iqm.pulse.gates.delay

Forces a delay between the preceding and following circuit operations. It can be applied to any number of qubits. Takes one argument, duration, which is the minimum duration of the delay in seconds. It will be rounded up to the nearest possible duration the hardware can handle.

Example#
CircuitOperation(name='delay', locus=('alice', 'bob'), args={'duration': 80e-9})

Note

We can only guarantee that the delay is at least of the requested duration, due to both hardware and practical constraints, but could be much more depending on the other operations in the circuit. To see why, consider e.g. the circuit

(
    CircuitOperation(name='cz', locus=('alice', 'bob'), args={}),
    CircuitOperation(name='delay', locus=('alice',), args={'duration': 1e-9}),
    CircuitOperation(name='delay', locus=('bob',), args={'duration': 100e-9}),
    CircuitOperation(name='cz', locus=('alice', 'bob'), args={}),
)

In this case the actual delay between the two CZ gates will be 100 ns rounded up to hardware granularity, even though only 1 ns was requested for alice.

Module Attributes

Locus

Names of the QPU components (typically qubits) a quantum operation instance is acting on, e.g. ("QB1", "QB2").

QIRCode

QIR program code in string representation

CircuitBatch

Type that represents a list of quantum circuits to be executed together in a single batch.

QubitMapping

Type that represents a qubit mapping for a circuit, i.e. a list of single qubit mappings for all qubits in the circuit.

PRXSequence

A sequence of PRX gates.

STANDARD_DD_STRATEGY

The default DD strategy uses the following gate sequences:

CircuitMeasurementResults

Measurement results from a single circuit.

CircuitMeasurementResultsBatch

Type that represents measurement results for a batch of circuits.

Functions

serialize_qubit_mapping(qubit_mapping)

Serializes a qubit mapping dict into the corresponding IQM data transfer format.

validate_circuit(circuit)

Validates a submitted quantum circuit.

Classes

CalibrationSet(*, calibration_set_id, ...)

Metadata and observations of a calibration set.

CircuitCompilationOptions([...])

Various discrete options for quantum circuit compilation to pulse schedule.

ClientLibrary(*, name[, package_name, ...])

Represents a client library with its metadata.

Counts(*, measurement_keys, counts)

Circuit measurement results in histogram representation.

DDMode(value[, names, module, qualname, ...])

Dynamical Decoupling (DD) mode for circuit execution.

DDStrategy(*, merge_contiguous_waits, ...)

Describes a particular dynamical decoupling strategy.

DynamicQuantumArchitecture(*, ...)

Dynamic quantum architecture as returned by server.

GateImplementationInfo(*, loci)

Information about an implementation of a quantum gate/operation.

GateInfo(*, implementations, ...)

Information about a quantum gate/operation.

HeraldingMode(value[, names, module, ...])

Heralding mode for circuit execution.

JobParameters(*, shots[, ...])

Job-specific parameters extracted from the original RunRequest.

Metadata(*[, calibration_set_id, request, ...])

Metadata describing a circuit execution job.

MoveGateFrameTrackingMode(value[, names, ...])

MOVE gate frame tracking mode for circuit compilation.

MoveGateValidationMode(value[, names, ...])

MOVE gate validation mode for circuit compilation.

QualityMetricSet(*, calibration_set_id, ...)

Quality metrics for a calibration set.

QuantumArchitecture(*, quantum_architecture)

Quantum architecture as returned by server.

QuantumArchitectureSpecification(*, name, ...)

Quantum architecture specification.

RunCounts(*, status[, counts_batch])

Measurement results of a circuit execution job in histogram representation.

RunRequest(*, circuits[, custom_settings, ...])

Request for an IQM quantum computer to run a job that executes a batch of quantum circuits.

RunResult(*, status[, measurements, ...])

Results of the quantum circuit execution job.

RunStatus(*, status[, message, warnings])

Status of a circuit execution job.

SingleQubitMapping(*, logical_name, ...)

Mapping of a logical qubit name to a physical qubit name.

StaticQuantumArchitecture(*[, dut_label])

Static quantum architecture of the server.

Status(value[, names, module, qualname, ...])

Status of a job.

Inheritance

Inheritance diagram of iqm.iqm_client.models