Introduction
qINTERCONNECT is a specialized solver for quantum photonics within the Ansys Lumerical INTERCONNECTTM platform. It is executed as a Python module that can be called from the Lumerical scripting environment or from any external Python editor such as PyCharm or Visual Studio Code.
Licensing
Two licenses Ansys Lumerical INTERCONNECT or Ansys Enterprise are required to run qINTERCONNECT directly within the INTERCONNECT scripting environment. Only one license is required to run qINTERCONNECT from an external Python editor.
Export Controls: As with many advanced simulation tools, Lumerical qINTERCONNECT is subject to US export control regulations. This means that using the software may require an export agreement from the US government.
Installation and Access: Access to Lumerical qINTERCONNECT requires registration with Ansys ID and downloading the software from the Ansys Customer Portal. This process involves verifying your company account number and following specific installation steps.
After installing the qINTERCONNECT software users can proceed with the step-by-step guide below:
Running qINTERCONNECT from INTERCONNECT platform
- Download NLS_ideal.py and NLS_ideal.icp from Non-Linear Sign (NLS) Gate – Ansys Optics
- Start the Optics Launcher
- Click New Project from the INTERCONNECT Photonic Integrated Circuit Solver line.
- Open the Script File Editor
- Click Open script then browse to NLS_ideal.py, or simply drag and drop the python file in the editor.
- Click Run script.
7. A command prompt window shows the calculation of a qubit gate with probability rate of 25% using only classical gates.
Running qINTERCONNECT from a python editor
We recommend the popular and versatile code editor Visual Studio Code (VSCode) or PyCharm for running qINTERCONNECT from an external Python environment.
Note: You must use the Python interpreter that is shipped with Lumerical.
- Install Python (if not already installed)
1.1 Download Python from python.org.
1.2 Run the Python Installer and select Add Python to PATH option during installation.
2. Install Microsoft Visual Studio Code (if not already installed)
2.1 Download Visual Studio Code (VSCode) from Download Visual Studio Code - Mac, Linux, Windows
2.2 Run the VSCode Installer and follow the installation prompts.
3. Prepare Your Project
3.1 Create a new folder for your qINTERCONNECT project.
3.2 Add the following files (you can find them here) to this folder:
3.2.1 NLS_ideal.py (Python script)
3.2.2 NLS_ideal.icp (INTERCONNECT project file)
4. Set Up Visual Studio Code
4.1 Launch VSCode
4.2 Click on File, Open Folder and browse to your project folder.
4.3 In the Explorer pane, you should see your project files listed.
5. Configure Python Interpreter
5.1 Press Ctrl+Shift+P (Windows/Linux), alternatively, click on the Python version at the bottom-right corner of the editor.
5.2 Type Python: Select Interpreter and choose this option.
5.3 Click + Enter interpreter path.
5.4 Enter the path to the Python version shipped with Lumerical. For example: C:\Program Files\Lumerical\v(...)\python\python.exe.
Note: The exact path may vary depending on your Lumerical installation:, e.g. 242.
6. Run qINTERCONNECT solver in VS Code
6.1 Open NLS_ideal.py file in VSCode.
7. Click the Run Python File button in the top-right corner of the editor (it looks like a play button).
The python script will be executed!
qINTERCONNECT basic gates
The qINTERCONNECT solver is used to calculate the evolution of a quantum state in a photonic integrated circuit (PIC). The quantum state in the Fock (number) basis is the input to the solver, which returns the output as a density matrix. States are represented by the photon occupation number of a particular mode, known as Fock states.
Quantum systems can be categorised based on the measurement type they have. In qINTERCONNECT we consider detectors resolving discrete photon numbers. Therefore, the basic resources that are necessary for linear optical quantum computing are single photon sources and detectors that can distinguish between 0,1 and 2 photons.
Discrete & Continuous variable
States | Measurement | |
---|---|---|
DV | Discrete |0> & |1> |
Photon number resolving detectors |
CV | Continuous |
Homodyne or Heterodyne detection |
We encode qubits with dual rail logic, which are encoded using the physical location of a photon. The basic terminology of quantum systems is described in this introductory article. There you can find how matrices and photon states are described and the related calculations.
Take for example a pair of waveguides A and B, where only one photon may exist. A single photon existing on the left waveguide correspond to the Fock state |1>A, this result in no photon for the waveguide B described as |0>B, and vice versa.
On the Fock basis this condition is described by the annotation: |1>A |0>B , which corresponds to the logical basis, |0>AB
Dual rail encoding scheme
Information in a quantum circuit can be stored and obtained much more efficiently than in a classical circuit. A comparison of the efficiency of both concepts shows that N input qubits can store 2N (classical) amplitude coefficients. The basic building blocks of a quantum circuit are single-qubit gates.[1]
Logical qubits are encoded in terms of physical qubits, which are directly measurable states of photons. There are single qubit gates e.g. phase control gates and multi-qubit gates can be the CNOT gate. Every gate corresponds to a circuit interacting with the quantum input state. For single qubit gates this realized with systems like phase delays, while multi-qubit gates such as the CNOT or NLS gates, require a photon-photon interaction.
Quantum logic gates are the building blocks of quantum circuits, like classical logic gates are for conventional digital circuits. Quantum gates are unitary operators.
Below we present the basic single qubit gates used in qINTERCONNECT.
Phase Gate:
The phase gate belongs to the family of single-qubit gates that map the states
|0⟩→|0⟩ & |1⟩→e^iφ |1⟩.
The probability of measuring a |0⟩ or |1⟩ is unchanged after applying this gate, however it modifies the phase of the quantum state. The phase shift gate Φ is realized with a phase shifter, in the dual rail logic
|ψin⟩=α|0⟩ΑB+β|1⟩ΑB
where φ is the phase shift with the period 2π.
Rotation Gate:
The rotation gate is a family of single-qubit gates that rotate the states along the x, y, or z-axes. For example, the rotation gate Rx(θ) acts on states as follows: In a dual rail encoding scheme, this corresponds to a coupling between waveguides, where θ represents the strength of the coupling. For instance, an Rx(θ) gate with θ=π/2 can be implemented by a 50:50 directional coupler.
The rotation control gate Rx(θ) is realized with a waveguide coupler (beam splitter):
Compact model library (CML) compatibility enables the simulation of parameter variations connected to physical models. For example, the coupling gap in the directional couplers can be varied to characterize the impact on the degree of the rotation.
Additionally, rotation control is possible around y and z axis as well.
Hadamard Gate:
The hadamard gate acts on single-qubit basis states to map them to equal superpositions of the basis states ∣0⟩ and ∣1⟩ state ∣0⟩→( ∣0⟩+ ∣1⟩)/sqrt(2) and ∣1⟩→( ∣0⟩- ∣1⟩)/sqrt(2) , an equal superposition of the two basis states.
The Hadamard gate can be created out of the combination of phase and rotation gates.
As gates get more complicated and difficult to work through the algebra, we can simulate them using qINTERCONNECT.
The qINTERCONNECT models comply with the following workflow:
i) Define the input state in the Fock basis,
ii) Design the INTERCONNECT file representing the circuit to be evaluated,
iii) Define the measurement operation to be performed on the final output state from the circuit.
Circuit performance is characterized by its probability of success and fidelity.
For a more complex example see: Non-Linear Sign (NLS) Gate
Related Publications
- S. Bartz, "Quantum computing with photons: introduction to the circuit model, the one way quantum computer, and the fundamental principles of photonic experiments", J. Phys. B: 48, 083001 (2015).
See also