We present ab initio molecular dynamics simulations of liquid and amorphous silicon dioxide. The interatomic forces in our simulations are calculated using real-space pseudopotentials, which were constructed using density-functional theory. Our simulations are carried out using BornOppenheimer molecular dynamics, i.e., the electronic structure problem is solved by performing fully self-consistent calculations for each time step. Using a subspace filtering iteration technique, we avoid solving the Kohn-Sham eigenvalue with "standard" diagonalization methods. We consider systems with up to 192 atoms (64 SiO2 units) in a periodic supercell for simulations over 20 ps. The liquid and amorphous ensembles are formed by thermally quenching random configurations of silicon and oxygen atoms. We compare our liquid and amorphous simulations with previously performed Car-Parrinello molecular dynamic simulations and with experiment. In particular, we examine the possible formation of two-fold rings, which were not observed in previous simulations using quantum forces. We attribute this difference to a "biased" initial configuration, which inhibits the formation of two-fold rings. We also compare the structural properties of our simulated amorphous systems with neutron diffraction measurements and find good agreement.