What you will learn in Quantum Programming in Depth
Solving problems with Q# and Qiskit
Chapter by chapter
Concepts explained in this book
- quantum oracleA marking oracle is a quantum oracle that identifies selected computational-basis states by applying a designated marking transformation to them.
- phase kickbackPhase kickback is a quantum effect in which a controlled operation transfers a phase associated with its target to the relative phase of the control-qubit state.
- reversible operationA reversible function is a function in which every input has exactly one output and every output is produced by exactly one input.
- quantum superpositionSuperposition is a quantum state formed as a coherent linear combination of multiple basis states with complex amplitudes.
- state preparationA state preparation algorithm is a computational procedure that transforms an initial quantum state into a specified target quantum state.
- controlled quantum operationA controlled gate is a quantum gate whose operation on a target system is conditioned on one or more control qubits.
- eigenphaseAn eigenphase is the phase associated with an eigenvalue of a unitary operator, typically expressed as the angle of that eigenvalue on the complex unit circle.
- classical functionA mapping from classical inputs to classical outputs that specifies the function implemented by an oracle.
- resource estimationResource estimation is analysis that estimates the computational resources required by a program or algorithm, such as qubits, gates, runtime, or hardware capacity.
- n-queens problemThe N queens puzzle is the problem of placing N chess queens on an N-by-N board so that no two queens attack each other.
- unitary transformationA unitary transformation is a linear transformation that preserves inner products and therefore quantum-state norm and measurement probabilities.
- QiskitQiskit is an open-source software development kit for writing and executing quantum programs, including a Python library interface.
- Grover's algorithmGrover's search algorithm is a quantum algorithm that finds a marked item in an unstructured search space with quadratic query-speedup over classical exhaustive search.
- quantum operationA quantum operation is a transformation or physical process acting on a quantum state, including unitary gates and measurement.
- computational basisThe computational basis is the reference basis of quantum states labeled by binary strings, including |0⟩ and |1⟩ for one qubit.
- controlled-on-zero gateA controlled-on-zero gate applies its target operation when its control qubits are in the zero state.
- quantum phase estimationQuantum phase estimation is a quantum algorithm for estimating the eigenphase associated with an eigenvalue of a unitary operator, given a corresponding eigenstate.
- probability theoryProbability is a numerical value between zero and one expressing the likelihood of a measurement outcome.
- quantum simulatorA quantum simulator is a classical computer program that simulates the behavior of a quantum system or quantum program.
- resultA measurement outcome is the classical result produced when a quantum measurement is performed on a quantum state.
- search spaceThe set of candidate inputs or basis states over which a search problem ranges.
- Q#Q# is Microsoft's domain-specific programming language for expressing quantum algorithms and operations.
- iterative phase estimationAdaptive phase estimation is a quantum algorithm that estimates an eigenphase incrementally by adjusting later circuit operations based on earlier measurement results.
- eigenvectorAn eigenstate is a quantum state that a quantum gate transforms into the same state multiplied by a scalar phase or eigenvalue.
- little-endianLittle-endian encoding orders a bit string or composite value with its least significant bit or component first.
- quantum measurementA quantum measurement is an observation process that maps a quantum state to a classical outcome according to quantum probabilities.
- quantum computingQuantum computing is computation that uses quantum-mechanical states and operations to process information.
- ancillary qubitAn auxiliary qubit is an additional qubit allocated to hold intermediate information during a quantum computation.
- logical NOTNegation is the logical operation that changes a true value to false and a false value to true.
- quantum computerQuantum hardware is physical computing equipment that stores and manipulates information in quantum states.
- uncomputationUncomputation is the reversible execution of a computation's inverse to erase intermediate information while preserving the desired output.
- sparse simulationA sparse simulator is a quantum simulator that represents and manipulates only a small subset of the basis states in a quantum state.
- diagonal matrixA diagonal matrix is a square matrix whose entries outside the main diagonal are zero.
- reflection about the meanReflection about the mean is a quantum operation that reflects amplitude values about their average amplitude.
- rotational gateAn Ry gate is a single-qubit rotation gate that rotates a qubit state around the Y axis of the Bloch sphere.
- big-endianBig-endian encoding orders a bit string or composite value with its most significant bit or component first.
- binary stringA bit string is a finite sequence of binary digits used here to represent a computational basis state.
- error correctionError correction is a technique that detects and corrects computational errors so that encoded logical information remains reliable despite hardware noise.
- truth tableA truth table is a tabular representation of the output of a Boolean operation for every possible combination of binary inputs.
- quantum algorithmA quantum algorithm is a computational procedure designed to run on a quantum computer and exploit quantum-mechanical operations or information.
- testA test case is a specified input scenario and expected result used to evaluate software behavior.
- hybrid quantum-classical computingA hybrid quantum-classical structure is a computational organization that combines classical processing with quantum computation and subsequent classical processing.
- x gateAn X gate is a single-qubit bit-flip quantum gate that exchanges the computational-basis states zero and one.
- quantum supremacyA claim that a quantum device has solved a problem that no classical computer can solve in a reasonable amount of time.
- Azure Quantum Resource EstimatorThe Azure Quantum Resource Estimator is a Microsoft tool that estimates the resources required to execute quantum programs on specified fault-tolerant quantum-computing architectures.
- search problemThe problem of finding an input value that satisfies a specified condition, such as a value for which a function returns one.
- phase gateThe Z gate is the single-qubit Pauli gate that leaves ket zero unchanged and multiplies ket one by negative one.
- Boolean clauseA Boolean clause is a component of a Boolean formula formed by a disjunction of literals.
- parityParity is the property of being even or odd, here determined for a computational-basis state by the parity of its bit values.
- cosine-sine factorA cosine-sine matrix, or CS matrix, is the structured matrix in a cosine-sine decomposition whose blocks contain cosine and sine values.
- unitary gate synthesisUnitary gate synthesis is the construction of a quantum-gate sequence that implements a specified unitary transformation, possibly approximately.
- unstructured searchA search problem in which the possible inputs have no exploitable structure for organizing or accelerating lookup.
- nonorthogonal stateA nonorthogonal state is a quantum state having a nonzero inner product with another state, so the two states cannot be perfectly distinguished by measurement.
- logical ORThe OR operator returns true when at least one of its Boolean operands is true.
- quadratic speedupA quadratic speedup is an algorithmic performance improvement in which runtime scales as the square root of the corresponding classical runtime.
- logical architectureA logical architecture is the organization of error-corrected quantum computation, including its error-correction code, logical-qubit connectivity, and supported logical operations.
- magic gateA magic gate is a fault-tolerant quantum operation that is not directly supported by a logical architecture and is implemented using magic states.
- magic state distillationMagic state distillation is a fault-tolerant procedure that converts multiple noisy resource states into fewer higher-fidelity magic states for quantum computation.
- relative phaseRelative phase is the phase difference between quantum amplitudes that affects interference independently of their magnitudes.
- Grover iterateA Grover iteration is one repetition of Grover's search procedure, combining an oracle operation with a reflection about the mean.
- Bell stateA Bell pair is a maximally entangled two-qubit quantum state.
- quantum amplitudeA quantum amplitude is a complex coefficient of a basis state whose squared magnitude determines its measurement probability.
- nonreversible functionA nonreversible function is a function for which the mapping cannot be uniquely inverted, such as when multiple inputs correspond to one output.
- cosine-sine decompositionA cosine-sine decomposition is a matrix factorization that represents an even-dimensional unitary matrix as a product of two block-diagonal unitary matrices and a structured cosine-sine factor.
- post-processingClassical postprocessing is the processing of quantum-computation results using classical computation.
- De Morgan's lawsDe Morgan's laws are Boolean identities relating negated conjunctions and disjunctions.
- equality functionAn equality function outputs one exactly when its two binary inputs are equal.
- out-of-place implementationAn out-of-place implementation computes a result in additional storage while preserving the input values.
- global phaseA global phase is a common complex phase factor multiplying every component of a quantum state.
- Hadamard gateThe Hadamard gate is a single-qubit quantum gate that creates equal superpositions from computational-basis states.
- permutation matrixA permutation matrix is a binary square matrix with exactly one 1 in every row and column.
- QuantumCircuitQuantumCircuit is a Qiskit class representing a quantum circuit and exposing operations for constructing or executing it.
- meanThe mean is the equal-superposition quantum state over all basis states in a specified search space.
- non-solution stateA non-solution state is the normalized superposition of basis states in the search space that do not satisfy the problem condition.
- solution stateA solution state is the normalized superposition of basis states whose inputs satisfy the problem condition.
- custom quantum gateA custom quantum gate is a user-defined quantum operation implementing a specified reversible transformation.
- addition modulo twoAddition modulo two is binary addition in which results are reduced to their remainder modulo two.
- pytestpytest is a Python testing framework for discovering, organizing, and running automated tests.
- logical gateA logical gate is an error-corrected quantum operation acting on one or more logical qubits.
- magic stateA magic state is a specially prepared ancillary quantum state that enables fault-tolerant implementation of otherwise unsupported quantum gates.
- performance estimationPerformance estimation is the analysis of the time and computational resources required to execute an algorithm on a specified computational architecture.
- state vector simulatorA full-state simulator represents every amplitude of a quantum state vector when simulating a quantum program.
- Bennett’s trickBennett’s trick is a reversible computation technique that copies an output to a separate register and then runs the computation backward to reset intermediate qubits.
- quantum entanglementEntanglement is a quantum correlation in which a composite system cannot be represented as independent states of its component systems.
- quantum interferenceInterference is the alteration of quantum amplitudes through their constructive or destructive combination.
- column constraintA column constraint is the N queens condition that each board column contains exactly one queen.
- diagonal constraintA diagonal constraint is the N queens condition that each board diagonal contains at most one queen.
- oracle queryA query is one evaluation of a black-box function or oracle on a supplied input.
- quantum stateA quantum state is a mathematical representation of the physical condition of a quantum system, including the probabilities of measurement outcomes.
- adjointThe adjoint of a complex matrix or linear operator is its conjugate transpose, and for a unitary operator it equals the inverse.
- least-significant bitThe least significant bit is the lowest-place bit in a binary representation and has the smallest positional value.
- amplitude encodingAmplitude encoding represents information in the absolute values of the amplitudes of quantum basis states.
- phase encodingPhase encoding represents information in the relative phases of the amplitudes of quantum basis states.
- Shor's algorithmShor's algorithm is a quantum algorithm for integer factorization with asymptotically better performance than the best known classical factorization algorithms.
- classical computerConventional computing based on classical physical systems and information representations rather than quantum-mechanical effects.
- binary representationBinary notation represents an integer or index as an ordered sequence of bits.
- classical preprocessingClassical preprocessing is the preparation and conversion of problem data before it is supplied to a quantum computation.
- inverse quantum Fourier transformThe inverse quantum Fourier transform is the inverse unitary transformation of the quantum Fourier transform, mapping encoded phase information back toward computational-basis information.
- Q# operationA Q# operation is a callable Q# construct that can accept parameters, act on qubits, and return a value.
- constraintA constraint is a condition that a candidate queen placement must satisfy, such as prohibiting two queens from sharing a row, column, or diagonal.
- cell-based board encodingA cell-based board encoding represents each cell of a chessboard with one binary bit indicating whether that cell contains a queen.
- quantum softwareSoftware that supports the development, testing, evaluation, execution, or operation of quantum-computing applications.
- measurement basisA measurement basis is a pair of orthogonal quantum states that defines the possible outcomes of a quantum measurement.
- input encodingAn input encoding is a representation that maps each queen's row position to the integer index of its occupied column.
- quantum programmingQuantum programming is the development of programs that specify or control computations on quantum systems.
- eigenvalueAn eigenvalue is the scalar, here a unit-modulus complex phase factor, by which a linear transformation scales an associated eigenvector.
- bitA bit is a binary digit that represents either zero or one.
- S† gateThe S† gate is the adjoint of the S phase gate and applies a phase of negative pi over two to the one computational-basis state relative to zero.
- joint measurementA joint measurement is a quantum measurement performed on multiple qubits or subsystems to obtain information about their collective properties or correlations.
- gate applicationThe programming operation of applying a quantum gate to one or more qubits.
- trapped ionA qubit encoded in the quantum state of an ion confined by electromagnetic fields.
- control patternA control pattern is a bit string or equivalent encoding specifying the basis values required on control qubits.
- orthogonalityAn orthogonal state is a quantum state whose inner product with another state is zero, allowing the two states to be perfectly distinguished by a suitable measurement.
- parity trickThe parity trick checks whether counts satisfy a constraint by computing their values modulo two instead of counting them exactly.
- W stateA W state is a multipartite quantum state that is an equal superposition of computational-basis states containing exactly one excited qubit.
- conjugationConjugation, or the Q# within-apply construct, performs a computation, applies an operation, and then automatically applies the computation's adjoint to uncompute intermediate state.
- unit typeUnit is a type with exactly one value, representing the absence of a meaningful return value.
- controlled-Z gateA controlled-Z gate is a two-qubit controlled phase gate that applies a phase flip when both qubits are in the one state.
- control qubitA control qubit is a qubit whose state determines whether a controlled gate operates on its target qubits.
- noisy intermediate-scale quantum eraThe stage of quantum-computing development characterized by devices with imperfect qubits that are not fully fault tolerant or broadly useful for computation.
- conjunctive normal formConjunctive normal form is a representation of a Boolean expression as a conjunction of clauses, with each clause formed from disjunctive literals.
- permutationA permutation is an arrangement containing each member of a finite set exactly once.
- error budgetAn error budget is the maximum allowed probability that an algorithm fails during execution.
- quantum state tomographyQuantum state tomography is a measurement-based technique for estimating an unknown quantum state from results collected from multiple identically prepared copies.
- block-diagonal unitaryA block-diagonal unitary is a unitary transformation represented by a block-diagonal matrix whose diagonal blocks are the active subtransformations.
- satisfiability problemThe Boolean satisfiability problem is the problem of finding an assignment to Boolean variables that makes a given Boolean expression true.
- quantum state discriminationState discrimination is the task of identifying which quantum state was provided from a specified set of possible states.
- MResetZMResetZ is a Q# operation that measures a qubit in the computational basis, resets it to the zero state, and returns a Result.
- qsharp.runqsharp.run is a Python API method that executes a Q# operation using a simulator instance.
- ResultResult is the Q# data type whose values represent quantum measurement outcomes as Zero or One.
- quantum system simulationQuantum system simulation is the computational modeling of the behavior and properties of physical systems governed by quantum mechanics.
- real amplitudeA real amplitude is a quantum amplitude whose imaginary component is zero.
- parity measurementA parity measurement is a quantum measurement that determines whether the combined bit values of a computational-basis state have even or odd parity.
- CNOT gateA CNOT gate is a two-qubit controlled-NOT gate that flips a target qubit when its control qubit is one.
- controlled-Ry gateA controlled-Ry gate is a controlled rotation gate that applies an Ry rotation to target qubits when its control qubits satisfy the control condition.
- target qubitA target qubit is a qubit on which a controlled gate conditionally performs its operation.
- technology stackA software stack is a layered collection of software components that collectively supports application execution on a computing platform.
- Azure Quantum Development KitThe Azure Quantum Development Kit is a Visual Studio Code extension for developing and executing Q# programs and accessing quantum-development actions.
- reset methodA reset operation measures a qubit and applies an X gate when necessary to return it to the computational-basis zero state.
- use statementA use statement is a Q# construct that allocates qubits for use within a program scope.
- parameterized gateA parameterized gate is a quantum gate whose transformation depends on one or more classical parameter values.
- quantum Fourier transformThe quantum Fourier transform is the quantum analogue of the discrete Fourier transform, mapping amplitudes between computational bases.
- quantum circuitA quantum circuit is a representation of a quantum computation as an ordered sequence of quantum gates and measurements.
- ApplyControlledOnIntApplyControlledOnInt is a Q# standard-library operation that applies a gate when control qubits match an integer-encoded bit pattern.
- Q# functionA Q# function is a deterministic classical callable in Q# that returns a value without producing side effects.
- error mitigationA family of techniques that reduces the impact of observed quantum-computation errors without fully correcting them during execution.
- fault-tolerant quantum computerA fault-tolerant quantum computer is a quantum computer that suppresses computational errors sufficiently to perform arbitrarily long computations reliably.
- neutral atomA quantum-computing platform that encodes and manipulates quantum information in electrically neutral atoms held in controlled configurations.
- photonA quantum-computing platform that encodes and processes information using individual particles of light.
- proof-of-concept deviceA device that demonstrates the fundamental feasibility of performing a computation with quantum-mechanical principles.
- superconducting circuitA quantum-computing platform whose quantum states are implemented with electrical circuits containing superconducting elements.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
